[Feature]: support using any ec2 instance tag within the domain template
purpleclay opened this issue · 0 comments
purpleclay commented
Describe your feature
Once an EC2 has been modified to include instance tags within the IMDS service. All tags are accessible through metadata. To provide greater flexibility to dns53
, any of these tags should be made available for Go templating.
Your potential solution
Capture all tags returned by IMDS and ensure they are sanitised in the same way as the Name tag by converting them to kebab case. A map can be indexed in many different ways within Go:
{{ .Map.Key }}
{{ index .Map "another-key" }}
The simplest form (the 1st) only works if the map key is alphanumeric. Remove any whitespace and automatically PascalCase each key in the map.
Any additional information?
No response
Code of Conduct
- I agree to follow this project's Code of Conduct