Help to create structure #571
-
|
Hi Community, I'm looking for a way to manage multiple servers (each with the same application) with a "terragrunt run-all plan/apply". I've written my own terraform provider which is already working quite well. At the moment I'm stuck with the conception of the path structures and the automation part :) Here the idea: . I was hoping I could define in the main.tf the provider and the required resources. In the common_vars.hcl I was thinking to define default values for the resources. In the terragrung.hcl in the subdirectories I'd like to define variables in case I want to override any from the common_vars. Can you please advise me if this expectation is doable with the way I'm approaching ? Or do I have to set it up differently ? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
I've made progress with the following: . the terragrunt.hcl in root dir is empty. `include "root" { terraform { inputs = { The main.tf contains the required terraform_providers (my custom provider), the defined resources & the default variables for each resource. So far it seems to work now. If anyone else still has another suggestion. Feel free to advise :) |
Beta Was this translation helpful? Give feedback.
-
|
Hi, Created simplified example in: https://github.com/denis256/terragrunt-tests/tree/master/common-module |
Beta Was this translation helpful? Give feedback.
Hi,
to reduce duplications,
terraformblock and default inputs can be extracted in HCL file in the root directory:Created simplified example in: https://github.com/denis256/terragrunt-tests/tree/master/common-module