Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
# Copy-paste your Terraform configurations here - for large Terraform configs,
# please share a link to the ZIP file.
resource "ibm_is_instance" "vsi_app" {
count = 1
name = "${var.resources_prefix}-vsi-${count.index + 1}"
vpc = ibm_is_vpc.vpc.id
zone = "${var.vpc_region}-${count.index + 1}"
keys = var.vpc_ssh_key
image = data.ibm_is_image.app_image_name.id
profile = var.vpc_app_image_profile
resource_group = data.ibm_resource_group.group.id
boot_volume {
name = "save-boot"
auto_delete_volume = false
}
primary_network_interface {
subnet = element(ibm_is_subnet.sub_app.*.id, count.index)
security_groups = [ibm_is_security_group.sg_maintenance.id]
}
}
Debug Output
N/A
Panic Output
N/A
Expected Behavior / Actual Behavior
When deleting the VSI (setting the count = 0) the VSI is deleted as expected, and the boot volume is NOT deleted as expected. However, what is NOT expected is the terraform.state file no longer contains ANY reference to the boot volume. The boot volume continues to exist in my account (which I expect), but the Terraform state file no longer contains that information.
Steps to Reproduce
terraform apply
review the terraform.state file and notice the boot_volume is in the state file.
set the is_instance count to 0
terraform apply
validate using the VPC UI that the boot_volume that was created during the first terraform apply is still available, however the terraform.state file no longer contains it.
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.
Debug Output
N/A
Panic Output
N/A
Expected Behavior / Actual Behavior
When deleting the VSI (setting the count = 0) the VSI is deleted as expected, and the boot volume is NOT deleted as expected. However, what is NOT expected is the terraform.state file no longer contains ANY reference to the boot volume. The boot volume continues to exist in my account (which I expect), but the Terraform state file no longer contains that information.
Steps to Reproduce
terraform apply
terraform apply
terraform apply
is still available, however the terraform.state file no longer contains it.Important Factoids
N/A
References
0000