Closed ep-93 closed 1 month ago
So yesteday I worked with Ewa on this adding a cool depends_on in the right place (I was only checking main.tf where all the other modules were called, not backup.tf)
This worked great, until a full destroy and and apply (takes some time annoyingly) chucks this error
│ The "count" value depends on resource attributes that cannot be determined until apply, so Terraform cannot predict
│ how many instances will be created. To work around this, use the -target argument to first apply only the resources
│ that the count depends on.
We dont want that, I will look at this today.
Expected Behavior
Baselines should just plan and apply smoothly.
Actual Behavior
When creating an account, baselines will fail with an error relating to this data call
https://github.com/ministryofjustice/modernisation-platform-terraform-baselines/blob/main/modules/backup/main.tf#L11
Its trying to call a kms key that has not yet been created.
Steps to Reproduce the Problem
Terraform destory on baselines in an account, and then apply, and see the error.
Version
No response
Modules
Baselines - https://github.com/ministryofjustice/modernisation-platform-terraform-baselines
Account
Any new account.