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 me too comments, 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.
If an issue is assigned to the 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 to hashibot, a community member has claimed the issue already.
Terraform Version
1.1.4
Affected Resource(s)
google_apigee_instance 4.8.0
Terraform Configuration Files
resource "google_apigee_instance" "instance" {
name = "${var.env}-${google_apigee_organization.org.name}-${var.region}"
# only single instance per region is possible
location = var.region
description = "Apigee Runtime Instance in ${var.region}"
org_id = google_apigee_organization.org.id
# disk encyption only for paid subscription only
# disk_encryption_key_name = google_kms_crypto_key.apigee-key.id
# change by removing peering_cidr_range with ip_range
# peering_cidr_range = "SLASH_22"
ip_range = "10.9.0.0/22"
}
Panic Output
# google_apigee_instance.instance must be replaced
+/- resource "google_apigee_instance" "instance" {
~ host = "10.9.0.2" -> (known after apply)
~ id = "organizations/.../instances/dev-myproject-us-central1" -> (known after apply)
+ ip_range = "10.9.0.0/22" # forces replacement
name = "dev-myproject-us-central1"
~ peering_cidr_range = "SLASH_22" -> (known after apply)
~ port = "443" -> (known after apply)
# (3 unchanged attributes hidden)
}
..
google_apigee_instance.instance: Creating...
╷
│ Error: Error creating Instance: googleapi: Error 409: instance "organizations/myproject/instances/dev-myproject-us-central1" already exists
│ Details:
│ [
│ {
│ "@type": "type.googleapis.com/google.rpc.RequestInfo",
│ "requestId": "10999007824841964626"
│ }
│ ]
│
│ with google_apigee_instance.instance,
│ on instances.tf line 2, in resource "google_apigee_instance" "instance":
│ 2: resource "google_apigee_instance" "instance" {
│
Expected Behavior
Terraform should first destroy google_apigee_instance before creation of updated one.
Currently it behaves like :
lifecycle {
create_before_destroy = true
}
but it is NOT set.
Trying to add
lifecycle {
create_before_destroy = false
}
explicitly does not work.
Actual Behavior
Terraform creates new apigee instance with update field and failed as the name is the same, but it should actually destory apigee instance first.
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
1.1.4
Affected Resource(s)
Terraform Configuration Files
Panic Output
Expected Behavior
Terraform should first destroy google_apigee_instance before creation of updated one.
Currently it behaves like :
but it is NOT set. Trying to add
explicitly does not work.
Actual Behavior
Terraform creates new apigee instance with update field and failed as the name is the same, but it should actually destory apigee instance first.
Steps to Reproduce
terraform apply