Loading...
Loading...
### Terraform Version ```shell ~Latest ``` ### Terraform Configuration Files ```terraform resource "google_compute_network" "network" { project = var.project_id provider = google-beta name = "test-network" auto_create_subnetworks = false routing_mode = "GLOBAL" } resource "google_compute_subnetwork" "test" { project = var.project_id provider = google-beta name = "test-subnetwork" ip_cidr_range = "10.0.3.0/24" region = "us-central1" network = google_compute_network.network.self_link } resource "google_compute_address" "test" { provider = google-beta project = var.project_id name = "internal-test" address_type = "INTERNAL" region = "us-central1" subnetwork = google_compute_subnetwork.test.id } resource "google_compute_address" "test2" { provider = google-beta project = var.project_id name = "internal-test2" address_type = "INTERNAL" region = "us-central1" subnetwork = google_compute_subnetwork.test.id } resource "google_network_management_connectivity_test" "test" { provider = google-beta project = var.project_id name = "test" source { ip_address = google_compute_address.test.address project_id = var.project_id network = google_compute_network.network.self_link network_type = "GCP_NETWORK" } destination { ip_address = google_compute_address.test2.address project_id = var.project_id network = google_compute_network.network.self_link port = 443 } protocol = "TCP" } ``` ### Debug Output ``` ...debug output, or link to a gist... ``` ### Expected Behavior Terraform should not attempt to modify the connectivity resource after creation. ### Actual Behavior Terraform mistakenly thinks that the saved value (the GCP "name" value is different than the proposed self_link value) even though they are semantically equivalent. ``` # google_network_management_connectivity_test.test will be updated in-place ~ resource "google_network_management_connectivity_test" "test" { name = "test" # (7 unchanged attributes hidden) ~ destination { ~ network = "projects/foo/global/networks/foo-network" -> "https://www.googleapis.com/compute/v1/projects/foo/global/networks/foo-network" # (4 unchanged attributes hidden) } ~ source { ~ network = "projects/foo/global/networks/foo-network" -> "https://www.googleapis.com/compute/v1/projects/foo/global/networks/foo-network" # (5 unchanged attributes hidden) } } ``` ### Steps to Reproduce 1. Create resources 2. Run terraform plan again and see resources attempt to get modified ### Additional Context _No response_ ### References _No response_ ### Generative AI / LLM assisted development? _No response_
Click on a version to see all relevant bugs
Terraform Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.