New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance/cloudformation getatt tags and resource naming #235

Merged
merged 13 commits into from Oct 22, 2014

Conversation

Projects
None yet
3 participants
@joekiller
Contributor

joekiller commented Oct 21, 2014

This PR provides five primary enhancements to CloudFormation:

It also fixes some tests that assumed that a resource would be named the same as the logical resource key.

joekiller added some commits Oct 20, 2014

Name resources via CloudFormation naming convention and tag EC2 resou…
…rces.

  * Make sure taggable resources are tagged per convention: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stack-parameters.html
  * Update CloudFormation parsing to use logical resource ids and name resources as CloudFomation would.
  * Fix tests for CloudFormation stack integration.
tweak Fn::GetAtt to return resource_json if resource is not implement…
…ed. DRY

This is better than failing out with a misleading Boto 400 error which should only happen when get_cfn_attribute is called but fails.
@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Oct 21, 2014

Coverage Status

Coverage decreased (-0.79%) when pulling 20a6925 on joekiller:enhance/cloudformation_getatt_tags_and_resource_naming into 68d2db5 on spulec:master.

coveralls commented Oct 21, 2014

Coverage Status

Coverage decreased (-0.79%) when pulling 20a6925 on joekiller:enhance/cloudformation_getatt_tags_and_resource_naming into 68d2db5 on spulec:master.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Oct 21, 2014

Coverage Status

Coverage decreased (-0.62%) when pulling d55a0b6 on joekiller:enhance/cloudformation_getatt_tags_and_resource_naming into 68d2db5 on spulec:master.

coveralls commented Oct 21, 2014

Coverage Status

Coverage decreased (-0.62%) when pulling d55a0b6 on joekiller:enhance/cloudformation_getatt_tags_and_resource_naming into 68d2db5 on spulec:master.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Oct 21, 2014

Coverage Status

Coverage decreased (-0.78%) when pulling d55a0b6 on joekiller:enhance/cloudformation_getatt_tags_and_resource_naming into 68d2db5 on spulec:master.

coveralls commented Oct 21, 2014

Coverage Status

Coverage decreased (-0.78%) when pulling d55a0b6 on joekiller:enhance/cloudformation_getatt_tags_and_resource_naming into 68d2db5 on spulec:master.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Oct 21, 2014

Coverage Status

Coverage decreased (-0.78%) when pulling d4cbc71 on joekiller:enhance/cloudformation_getatt_tags_and_resource_naming into 68d2db5 on spulec:master.

coveralls commented Oct 21, 2014

Coverage Status

Coverage decreased (-0.78%) when pulling d4cbc71 on joekiller:enhance/cloudformation_getatt_tags_and_resource_naming into 68d2db5 on spulec:master.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Oct 22, 2014

Coverage Status

Coverage decreased (-0.69%) when pulling 8352596 on joekiller:enhance/cloudformation_getatt_tags_and_resource_naming into 68d2db5 on spulec:master.

coveralls commented Oct 22, 2014

Coverage Status

Coverage decreased (-0.69%) when pulling 8352596 on joekiller:enhance/cloudformation_getatt_tags_and_resource_naming into 68d2db5 on spulec:master.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Oct 22, 2014

Coverage Status

Coverage decreased (-0.71%) when pulling 184d5be on joekiller:enhance/cloudformation_getatt_tags_and_resource_naming into 68d2db5 on spulec:master.

coveralls commented Oct 22, 2014

Coverage Status

Coverage decreased (-0.71%) when pulling 184d5be on joekiller:enhance/cloudformation_getatt_tags_and_resource_naming into 68d2db5 on spulec:master.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Oct 22, 2014

Coverage Status

Coverage decreased (-0.71%) when pulling 8aabda0 on joekiller:enhance/cloudformation_getatt_tags_and_resource_naming into 68d2db5 on spulec:master.

coveralls commented Oct 22, 2014

Coverage Status

Coverage decreased (-0.71%) when pulling 8aabda0 on joekiller:enhance/cloudformation_getatt_tags_and_resource_naming into 68d2db5 on spulec:master.

@joekiller

This comment has been minimized.

Show comment
Hide comment
@joekiller

joekiller Oct 22, 2014

Contributor

@spulec added a few tests and removed a debug exception catch.

Contributor

joekiller commented Oct 22, 2014

@spulec added a few tests and removed a debug exception catch.

@@ -14,8 +16,7 @@
"Description": "Create a multi-az, load balanced, Auto Scaled sample web site. The Auto Scaling trigger is based on the CPU utilization of the web servers. The AMI is chosen based on the region in which the stack is run. This example creates a web service running across all availability zones in a region. The instances are load balanced with a simple health check. The web site is available on port 80, however, the instances can be configured to listen on any port (8888 by default). **WARNING** This template creates one or more Amazon EC2 instances. You will be billed for the AWS resources used if you create a stack from this template.",
"Resources": {
"WebServerGroup": {
"Queue": {

This comment has been minimized.

@spulec

spulec Oct 22, 2014

Owner

Oops...

@spulec

spulec Oct 22, 2014

Owner

Oops...

spulec added a commit that referenced this pull request Oct 22, 2014

Merge pull request #235 from joekiller/enhance/cloudformation_getatt_…
…tags_and_resource_naming

Enhance/cloudformation getatt tags and resource naming

@spulec spulec merged commit c02ed66 into spulec:master Oct 22, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
@spulec

This comment has been minimized.

Show comment
Hide comment
@spulec

spulec Oct 22, 2014

Owner

This is excellent. Thanks!

Owner

spulec commented Oct 22, 2014

This is excellent. Thanks!

@joekiller joekiller deleted the joekiller:enhance/cloudformation_getatt_tags_and_resource_naming branch Oct 22, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment