Open jor2 opened 2 weeks ago
Thank you @jor2 for reaching out. I am looking into this one. And will get back to you on this one.
@jor2 This is caused due to the lag between the request to create the lifecycle configuration and it getting applied at the backend. We are checking with the backend team on this one and get back to you, mean while a delay between the terraform apply could be used as a work around. Thank you.
@jor2 This is caused due to the lag between the request to create the lifecycle configuration and it getting applied at the backend. We are checking with the backend team on this one and get back to you, mean while a delay between the terraform apply could be used as a work around. Thank you.
@ocofaigh should we wait for the fix? We can just implement the sleep and then remove once its done instead of having to maintain the pr with future commits
@IBM-diksha what is your plan for fix? If the backend is still applying config, I would expect the fix should be that the ibm_cos_bucket_lifecycle_configuration
resource should not be marked as complete by terraform until the config is indeed set on the backend. Perhaps you can update the provider code to do some kind of GET before marking resource as complete?
@jor2 OK I guess we can proceed with the sleep workaround in our PR
Community Note
Terraform CLI and Terraform IBM Provider Version
Affected Resource(s)
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
main.tf
variables.tf
providers.tf
version.tf
outputs.tf
Debug Output
logs.txt
Panic Output
Expected Behavior
The plan should not have failed due to not being able to fetch the Lifecycle Configuration that was just created.
Actual Behavior
It fails to fetch the lifecyle configuration. If you give it a few more seconds and run the plan it will pass. This suggests the lifecyle policy is not fully complete yet being marked as complete by terraform. Adding a 30second sleep on create fixes this.
Steps to Reproduce
terraform apply
terraform plan
ran instantly after the apply completes.Important Factoids
References
0000