2 ms·
> For one, building out anything of complexity in Terraform often involves some trial and error to make sure all the resources are wired together correctly. Th
by acdha 4y ago
> For one, building out anything of complexity in Terraform often involves some trial and error to make sure all the resources are wired together correctly.
This seems like misattribution: you do that everywhere when you’re doing something new - the problem is the underlying gap between the understanding of the problem which you started with and what the underlying services actually require. You can avoid most of that by using modules to reduce the amount of new structure you need to develop and static linters (tflint, tfsec, etc.) to flag things in advance.
> For two, there are some Terraform changes that can incur downtime if you just let Terraform destroy and create resources.
This should never be necessary due to Terraform - that’s one of the major advantages over older tools like AWS CloudFormation. If you’re seeing this as a problem where it’s not imposed by the platform (e.g. many AWS resources won’t allow you to change the name after creation) you can use lifecycle rules to avoid forcing re-creation where that makes sense or to create the replacement first & switch over before deleting the old resource. If you relocated the definitions in your code, you can tell Terraform how to migrate old state non-destructively.