3 ms·
This is a great read, but I always seem to run into cases where I need to define something like a security group and then reference it when deploying ec2 instan
by pezh0re 3y ago
This is a great read, but I always seem to run into cases where I need to define something like a security group and then reference it when deploying ec2 instances. I'd love to decouple to reduce my plan time, but I haven't figured a way out as of yet.
To be fair, I haven't used terraform -chdir yet.
- c0Re69 3y agoTry Terragrunt https://terragrunt.gruntwork.io/docs/ https://terragrunt.gruntwork.io/docs/
- JohnMakin 3y agoyou can pull it in via a data source, but then of course this creates a coupling between multiple modules/state files.
- OJFord 3y ago-chdir is useful, but nothing to do with this (it's literally just cd before running command). As sibling said, use data source to read remote state outputs.
- 36chamber 3y agonot sure what you mean here. Do you use the same security group for all of your instances? i am usually creating a security group per group of related ec2 instances.