Closed hashibot closed 6 years ago
@danawillow: Hey, just to notice you I created this issue on terraform core https://github.com/hashicorp/terraform/issues/16065 I'm hoping I was clear enough
Closing as out-of-date since the attached_disk field doesn't allow setting auto_delete.
I'm going to lock this issue because it has been closed for 30 days β³. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error π€ π , please reach out to my human friends π hashibot-feedback@hashicorp.com. Thanks!
This issue was originally opened by @zopanix as hashicorp/terraform#13377. It was migrated here as part of the provider split. The original body of the issue is below.
Provider
Google Cloud
Type
Enhancement
Terraform Version
0.9.1
0.9.2
Affected Resource(s)
google_compute_instance
google_compute_disk
It doesn't seem to affect terrform core. It's just the way google cloud work which breaks this.
Terraform Configuration Files
Debug Output
There is no need for debug as this is not a bug, I expected Terraform to act this way when I saw the plan.
Expected Behavior
Context:
I'm creating an instance which has a data disk that does not persist when the server is deleted (auto_delete = true), I know it's a weird case but basically, I want the data to be on a separate disk for snapshot purposes but I don't need the data to be persistent since it's replicated and will get synced on instance update (deletion and recreation).
What I expect
Since the disk's flag is set to auto delete, I expect the plan's to output instance and disk removal because it's going to be automatically removed. Terraform should then remove the instance once that is done, it should wait for the competion of the deletion of all disk's that have the
auto_delete
flag totrue
. And then recreate thedata
disks (in my case) before recreating the server.Actual Behavior
What actually happened? Terraform doesn't take into account that the disks that are flag as
auto_delete
will disappear and output and error on applying the config because the disks are existant according to it's state but in reality, after deleting the instance, the disk were also delete. Terraform should be aware of that since it has enough information.Here is a plan/apply error
Apply:
Error Message
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
terraform apply
References
I didn't find any open issues related to this.
Work around that work
Work around that doesn't work
Comments
I'll look into the code and see if it's a quick fix or not and comment below my findings