Open kishorviswanathan opened 3 years ago
@kishorv06 In the step 4, do you mean the new storage object created in step 1 is getting deleted ?
Actual Behavior
1. google_storage_bucket_object is created.
2. Replacement for google_compute_instance_template is created
3. Old google_compute_instance_template is deleted.
4. google_storage_bucket_object is deleted.
I don't item 4th isn't happening, the old storage object is correctly replaced by the new one.
Can you please attach your debug log to understand what's going on ?
You should only one DELETE call to the storage api alike below
DELETE /storage/v1/b/cloudfunction-xxxx/o/startInstancePubSub1.zip?alt=json&prettyPrint=false HTTP/1.1
@venkykuberan By new object, I guess you meant the replacement resource created because of the create_before_destory
flag?
I am not sure if google_storage_bucket_object
even supports create_before_destroy
as the resource doesn't have a random suffix in the self_link
and might have a unique constraint for the object name.
The end result in my case is, the object would go missing from the bucket and there would be a difference in the terraform plan.
I will post the debug log ASAP.
Sorry, The example I have mentioned didn't reproduced the issue. So I have updated it to one that reproduces.
Debug log: https://pastebin.com/PQTQCx1M
As you can see in the debug log, the second apply ( after updating the content of file ) wasn't applied properly. The storage object was deleted and I had to apply the changes once again to create the object again.
Community Note
modular-magician
user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned tohashibot
, a community member has claimed the issue already.Terraform Version
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
When updating contents of
test_object
:google_storage_bucket_object
should be replaced.google_compute_instance_template
should be created.google_compute_instance_template
will be deleted.Actual Behavior
google_storage_bucket_object
is created.google_compute_instance_template
is createdgoogle_compute_instance_template
is deleted.google_storage_bucket_object
is deleted.Steps to Reproduce
test_object
file.terraform apply
test_object
.terraform apply
. This should trigger a replacement for the instance-template.google_storage_bucket_object
still exists.References
647