-
Notifications
You must be signed in to change notification settings - Fork 22
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
Terragrunt setup, DNS delegation for az.vedenemo.dev #320
Conversation
This adds an experiment using Terragrunt for managing Terraform resources and dependencies. For now, this is limited to the "prod-eun" environment. reusing an existing state bucket. It creates a resource group in one state, and then creates a DNS Zone in another state (prod-eun.az.vedenemo.dev), passing down the resource group name as an input. A followup commit will add another state, holding the az.vedenemo.dev DNS Zone and manage the delegation of prod-eun.az.vedenemo.dev. Signed-off-by: Florian Klink <[email protected]>
This manages the DNS Record az.vedenemo.dev. Signed-off-by: Florian Klink <[email protected]>
This now creates glue records for every environment passed in the `ns_delegations` variable. We pass in date from the zone created for the prod-eun/dns state. Signed-off-by: Florian Klink <[email protected]>
This creates a TXT record at test.prod-eun.az.vedenemo.dev that should resolve once the NS delegation on vedenemo.dev has been completed. Signed-off-by: Florian Klink <[email protected]>
This documents the `vedenemo` Terraform state. Signed-off-by: Florian Klink <[email protected]>
Thanks @flokli I agree there are problems with the current workspace-based approach, anything we can do to improve the workflow or make our terraform usage a bit more industry standard is very much welcome.
Also, can you reference a good source of documentation that would help others also see the bigger picture of how this should be used and how the layout would eventually end-up? |
The bigger picture would be that the different components would be terraform modules instantiated from the different environment, but explicitly written down for each environment, and things like persistent volumes passed from one Terraform State to another via the inputs mechanism. I'm not aware of any public repo using terragrunt to showcase this more, but there's some generic documentation describing some of the DRY practices: https://terragrunt.gruntwork.io/docs/features/keep-your-terragrunt-architecture-dry/
Yes. The fact we now have an additional DNS Zone managed this way won't cause any problems with the existing Terraform states, so this can be merged.
Yes, starting with my personal environment was the next step I had in mind, and this should make this a bit less abstract, and "flesh out some calling conventions"
I'd assume more directories to appear in the |
This sets up a DNS zone for az.vedenemo.dev, and allows different environments to manage their own DNS zones, one subdomain per environment.