Cloudy-Networks / cloudydeploys

Deploy infrastructure for games and more in the free tier of AWS
0 stars 0 forks source link

Make r53 HostedZone template generic without breaking export/import #7

Closed russelltadams closed 3 years ago

russelltadams commented 3 years ago

https://github.com/Cloudy-Networks/freetierdeploys.aws/blob/ea21a847f8ccb2671f7a233d0c2a8e8e882a9f27/CloudFormation/vpc/freetier/r53.cf#L3-L9

r53 template should not reference any names not given as a parameter by the user, but should also maintain a predictable output export that ec2 template (or some other sub-stack) can use to make host entries in the zone.

The user says: "I should not have to edit this file to create my hostedzone. And if I do edit this file I also have to edit references to its export/import in another template. Not ideal. I should be able to give the name of my hostedzone as a parameter and it should just work."

russelltadams commented 3 years ago

I think making the resource name "generic" and parameterizing the Name property, and updating the output/export resource, value, and name to follow suit are all that is needed, as well as updating the reference in the ec2 template to the export.

russelltadams commented 3 years ago

Hostname value also should be parameterized in ec2 template and joined to the domain name... though I am not sure the HostedZone "Name" is something we can export from the resource... my current understanding is that only the HostedZone ID can be exported from HostedZone resource... so it will need to be grabbed via the parameter, which should work...