You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that you can successfully create resources using attribute values that just provide an API path (example: projects/wf-gcp-gb-vpchost-prod/global/networks/wf-gcp-gb-vpchost-prod-network) but these don't persist -- Terraform tries to constantly recreate them on every plan/apply unless you provide the full path (example: https://www.googleapis.com/compute/v1/projects/wf-gcp-gb-vpchost-prod/global/networks/wf-gcp-gb-vpchost-prod-network).
Terraform Version
Terraform v0.11.1
Affected Resource(s)
google_compute_forwarding_rule
google_compute_instance_group
probably others
Terraform Configuration Files
# Causes a resource refresh even if the resource is already present and not changing:resource"google_compute_forwarding_rule""internal" {
count="${var.internal_only?"1":"0"}"backend_service="${google_compute_region_backend_service.internal.self_link}"load_balancing_scheme="${local.scheme}"name="${local.base_name}-forwarder"network="projects/wf-gcp-gb-vpchost-prod/global/networks/wf-gcp-gb-vpchost-prod-network"ports=["${var.service_port}"]
project="${var.project}"region="${var.region}"subnetwork="projects/wf-gcp-gb-vpchost-prod/regions/${var.region}/subnetworks/${var.network}"
}
# Does not resource refresh after creation, as expected:resource"google_compute_forwarding_rule""internal" {
count="${var.internal_only?"1":"0"}"backend_service="${google_compute_region_backend_service.internal.self_link}"load_balancing_scheme="${local.scheme}"name="${local.base_name}-forwarder"network="https://www.googleapis.com/compute/v1/projects/wf-gcp-gb-vpchost-prod/global/networks/wf-gcp-gb-vpchost-prod-network"ports=["${var.service_port}"]
project="${var.project}"region="${var.region}"subnetwork="https://www.googleapis.com/compute/v1/projects/wf-gcp-gb-vpchost-prod/regions/${var.region}/subnetworks/${var.network}"
}
Nothing was changing about the sources, so it shouldn't have appeared in the plan output.
Actual Behavior
The resource refreshes, and appears to try to remove part of the full URL to match local configuration.
Steps to Reproduce
Create a resource that has an attribute requiring an API resource URL.
Provide a URL API path, removing https://www.googleapis.com/compute/v1.
terraform apply, observe the resource is successfully created.
terraform plan, observe that Terraform wants to destory/recreate the resource.
Adding back the URL API path to the attribute causes this behavior to cease, although it seems like this is a bug since you can create the resource with the more succinct URL path.
The text was updated successfully, but these errors were encountered:
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 👉 [email protected]. Thanks!
ghost
locked and limited conversation to collaborators
Mar 30, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
It appears that you can successfully create resources using attribute values that just provide an API path (example:
projects/wf-gcp-gb-vpchost-prod/global/networks/wf-gcp-gb-vpchost-prod-network
) but these don't persist -- Terraform tries to constantly recreate them on every plan/apply unless you provide the full path (example:https://www.googleapis.com/compute/v1/projects/wf-gcp-gb-vpchost-prod/global/networks/wf-gcp-gb-vpchost-prod-network
).Terraform Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
https://gist.github.com/spacez320/b5cebc3c5f8adfb0c9c3f201f8d4c2a8
Expected Behavior
Nothing was changing about the sources, so it shouldn't have appeared in the plan output.
Actual Behavior
The resource refreshes, and appears to try to remove part of the full URL to match local configuration.
Steps to Reproduce
https://www.googleapis.com/compute/v1
.terraform apply
, observe the resource is successfully created.terraform plan
, observe that Terraform wants to destory/recreate the resource.Adding back the URL API path to the attribute causes this behavior to cease, although it seems like this is a bug since you can create the resource with the more succinct URL path.
The text was updated successfully, but these errors were encountered: