dimanche 11 octobre 2015

Does `cfn-init` execute new commands (of a configSet) during a stack-update

Having a Configset as in this example:

"AWS::CloudFormation::Init" : {
    "configSets" : {
        "ascending" : [ "config1" , "config2" ],
        "descending" : [ "config2" , "config1" ]
    },
    "config1" : {
        "commands" : {
            "test" : {
                "command" : "echo \"$CFNTEST\" > test.txt",
                "env" : { "CFNTEST" : "I come from config1." },
                "cwd" : "~"
            }
        }
    },
    ...
}   

If i add a command/modify the existing one as follows:

"config1" : {
        "commands" : {
            "test" : {
                "command" : "echo \"$CFNTEST\" > test.txt",
                "env" : { "CFNTEST" : "I come from config1." },
                "cwd" : "~"
            },
            "test2" : {
                "command" : "echo \"$CFNTEST\" > test2.txt",
                "env" : { "CFNTEST" : "I come from config2." },
                "cwd" : "~"
            }
        }
    }

Will the file test2.txt be created? If yes what happends if i modify "env" for example?




Aucun commentaire:

Enregistrer un commentaire