mardi 6 janvier 2015

AWS Cloudformation - reference tag

I've been looking at moving to CF for some more streamlined infrastructure & code deployment, but I've hit a hurdle. I'm looking to deploy web code stored on s3 to a team of iis web servers. I'd like to be able to upgrade the codebase by changing the tag in an auto-scaling group, but I'm unable to find a way to "read" the tag which will be assigned to the ec2 instance for use in AWS::CloudFormation::Init. The theory here is that we won't have to update the CF everytime we roll a version, or roll-back, just the tag on the auto-scaling group (followed by a scale up and scale down to trigger ec2 instances to rebuild)


i.e. (obviously "Ref" isn't the right way to go here) "sources" : { "c:\inetpub\wwwroot\" : { "Fn::Join" : ["",[{"Ref": "S3_Repo"},{"Ref": "Codebase"},{"Ref":"Version"}, ".zip" ]] } },


note: static path works fine here, and if I define S3_Repo, Codebase and Version as a Parameter, that also works fine.





Aucun commentaire:

Enregistrer un commentaire