githubEdit

Why do my Terraform builds fail when creating new SNS queue resources?

Context When creating new queues on existing SNS topics in Terraform, you may encounter build failures even when the configuration appears to match existing resources. This typically occurs when creating new resources in a services module that reference outputs from resources that haven't been created yet. Answer This build failure is expected behavior when working with dependent resources in Terraform. When you create new resources in a services module that other modules (like app-eks) depend on, the build will fail until the services module is applied first. To resolve this: First apply the changes in the services module where the new resources are being created Once the services module is applied and the resources are created, the dependent modules (like app-eks) can be applied successfully This happens because Terraform needs to create the resources and their outputs in a specific order to satisfy dependencies between modules. The build failure is a safeguard to ensure resources are created in the correct order.

Last updated

Was this helpful?