Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Let Cloudformation generate names for ELB resources #136

Closed
sevenmachines opened this issue Jul 21, 2015 · 0 comments · Fixed by #143
Closed

Let Cloudformation generate names for ELB resources #136

sevenmachines opened this issue Jul 21, 2015 · 0 comments · Fixed by #143

Comments

@sevenmachines
Copy link
Contributor

We currently hard code the name of the ELB, RDS and S3 buckets that bootstrap-cfn creates.

This means that creating duplicate environments of the same flavour (i.e. another 'dev' env) means we have to duplicate the block in the YAML and change some identifiers.

Instead we can do this:

{
    "Outputs": {
      "staticbucket": {
        "Description": "x",
        "Value": { "Ref": "StaticBucket" }
      }
    },
    "Resources": {
        "StaticBucket": {
            "Properties": {
                "AccessControl": "BucketOwnerFullControl"
            },
            "Type": "AWS::S3::Bucket"
        }
    }
}

Note how there's no BucketName specified.

I went and created this template and cloudformation with a stack name of "Ash-s3-test" and the bucket that was created was ash-s3-test-staticbucket-1hgn7cc7bhnak – that's <stackname>-<logical-resource-name>-<random>. Given that we can make it an output this means we can find the name given in the same way we do with RDS.

We should do similar things for the ELB (where the name of ELB doesn't matter, just the DNS name) and RDS (which we don't need the name at all anyway - just the endpoint which is already an output)

@sevenmachines sevenmachines self-assigned this Jul 21, 2015
@sevenmachines sevenmachines added this to the finish-template-deploy milestone Jul 21, 2015
sevenmachines pushed a commit that referenced this issue Jul 22, 2015
This change removes settings LoadBalancerName manually and
uses the AWS auto naming instead. ELB names are now not
mandatory. (Closes #136)

- Add elb dns names as outputs
- Arbitrary elb logical ids
- Remove default security group for ELBs
sevenmachines pushed a commit that referenced this issue Jul 23, 2015
This change removes settings LoadBalancerName manually and
uses the AWS auto naming instead. ELB names are now not
mandatory. (Closes #136)

- Add elb dns names as outputs
- Arbitrary elb logical ids
- Remove default security group for ELBs
- Pass troposphere template to elb function so that resources
and outputs can be set up internal to the function
- Check we have AutoScalingGroups before attaching to them
- Update tests for elb method requiring template
sevenmachines pushed a commit that referenced this issue Jul 23, 2015
This change removes settings LoadBalancerName manually and
uses the AWS auto naming instead. ELB names are now not
mandatory. (Closes #136)

- Add elb dns names as outputs
- Arbitrary elb logical ids
- Remove default security group for ELBs
- Pass troposphere template to elb function so that resources
and outputs can be set up internal to the function
- Check we have AutoScalingGroups before attaching to them
- Update tests for elb method requiring template
- Merge test:test_elb security group checks into overall cfg check
sevenmachines pushed a commit that referenced this issue Jul 23, 2015
This change removes settings LoadBalancerName manually and
uses the AWS auto naming instead. ELB names are now not
mandatory. (Closes #136)

- Add elb dns names as outputs
- Arbitrary elb logical ids
- Remove default security group for ELBs
- Pass troposphere template to elb function so that resources
and outputs can be set up internal to the function
- Check we have AutoScalingGroups before attaching to them
- Update tests for elb method requiring template
- Merge test:test_elb security group checks into overall cfg check
sevenmachines pushed a commit that referenced this issue Jul 23, 2015
This change removes settings LoadBalancerName manually and
uses the AWS auto naming instead. ELB names are now not
mandatory. (Closes #136)

- Add elb dns names as outputs
- Arbitrary elb logical ids
- Remove default security group for ELBs
- Pass troposphere template to elb function so that resources
and outputs can be set up internal to the function
- Check we have AutoScalingGroups before attaching to them
- Update tests for elb method requiring template
- Merge test:test_elb security group checks into overall cfg check
- PEP8 fixes
sevenmachines pushed a commit that referenced this issue Jul 23, 2015
This change removes settings LoadBalancerName manually and
uses the AWS auto naming instead. ELB names are now not
mandatory. (Closes #136)

- Add elb dns names as outputs
- Arbitrary elb logical ids
- Remove default security group for ELBs
- Pass troposphere template to elb function so that resources
and outputs can be set up internal to the function
- Check we have AutoScalingGroups before attaching to them
- Update tests for elb method requiring template
- Merge test:test_elb security group checks into overall cfg check
- PEP8 fixes
sevenmachines pushed a commit that referenced this issue Jul 23, 2015
This change removes settings LoadBalancerName manually and
uses the AWS auto naming instead. ELB names are now not
mandatory. (Closes #136)

- Add elb dns names as outputs
- Arbitrary elb logical ids
- Remove default security group for ELBs
- Pass troposphere template to elb function so that resources
and outputs can be set up internal to the function
- Check we have AutoScalingGroups before attaching to them
- Update tests for elb method requiring template
- Merge test:test_elb security group checks into overall cfg check
- PEP8 fixes
@sevenmachines sevenmachines removed their assignment Jul 23, 2015
sevenmachines pushed a commit that referenced this issue Jul 23, 2015
This change removes settings LoadBalancerName manually and
uses the AWS auto naming instead. ELB names are now not
mandatory. (Closes #136)

- Add elb dns names as outputs
- Arbitrary elb logical ids
- Remove default security group for ELBs
- Pass troposphere template to elb function so that resources
and outputs can be set up internal to the function
- Check we have AutoScalingGroups before attaching to them
- Update tests for elb method requiring template
- Merge test:test_elb security group checks into overall cfg check
- PEP8 fixes
sevenmachines pushed a commit that referenced this issue Jul 30, 2015
This change removes settings LoadBalancerName manually and
uses the AWS auto naming instead.

* Do not set LoadBalancerName manually, use AWS auto naming
* Add elb dns names as outputs
* Pass troposphere template to elb function so that resources
and outputs can be set up internal to the function
* Update tests for elb method requiring template and resultant
need to seperate out resource componenents for comparison

(Closes #136)
sevenmachines pushed a commit that referenced this issue Jul 30, 2015
This change removes settings LoadBalancerName manually and
uses the AWS auto naming instead.

* Do not set LoadBalancerName manually, use AWS auto naming
* Add elb dns names as outputs
* Pass troposphere template to elb function so that resources
and outputs can be set up internal to the function
* Update tests for elb method requiring template and resultant
need to seperate out resource componenents for comparison
* PEP8 fixes for test.py and test_iam.py

(Closes #136)
@sevenmachines sevenmachines self-assigned this Jul 30, 2015
@sevenmachines sevenmachines removed their assignment Jul 30, 2015
sevenmachines pushed a commit that referenced this issue Aug 5, 2015
This change removes settings LoadBalancerName manually and
uses the AWS auto naming instead.

* Do not set LoadBalancerName manually, use AWS auto naming
* Add elb dns names as outputs
* Pass troposphere template to elb function so that resources
and outputs can be set up internal to the function
* Update tests for elb method requiring template and resultant
need to seperate out resource componenents for comparison
* PEP8 fixes for test.py and test_iam.py

(Closes #136)
sevenmachines pushed a commit that referenced this issue Aug 7, 2015
This change removes settings LoadBalancerName manually and
uses the AWS auto naming instead.

* Do not set LoadBalancerName manually, use AWS auto naming
* Add elb dns names as outputs
* Pass troposphere template to elb function so that resources
and outputs can be set up internal to the function
* Update tests for elb method requiring template and resultant
need to seperate out resource componenents for comparison
* PEP8 fixes for test.py and test_iam.py

(Closes #136)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants