-
I'm looking to deploy the same module in every region (or at least a lot of them). Is there some example of this somewhere or a recommend approach? I've searched both the internet and these forums, sorry if I missed it. I'd really prefer to avoid something like https://github.com/gruntwork-io/terraform-aws-security/blob/master/modules/aws-config-multi-region/main.tf if there is a better way. I see https://github.com/gruntwork-io/terraform-aws-security/blob/master/modules/aws-config-multi-region/variables.autogen.tf, is this just scripted somewhere else and is it something we can use? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Fair point! One way you could do this is how we do it in I think there's a fairly thorough explanation describing how you'd go about adding a new module, but from that info you could extrapolate how you'd write your own multi-region module generator. Check these out: |
Beta Was this translation helpful? Give feedback.
Fair point! One way you could do this is how we do it in
terraform-aws-security
. You found that autogen file, but it's created by a code generator in thecodegen
directory. These contain code to automate the multi-region configuration.I think there's a fairly thorough explanation describing how you'd go about adding a new module, but from that info you could extrapolate how you'd write your own multi-region module generator. Check these out: