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
The VM instance is properly read and available but the id field is incorrect (mangled) and looks like this:
Excerpt from the plan:
+ id = "projects/REDACTED-project-id/zones/https://www.googleapis.com/compute/v1/projects/REDACTED-project-id/zones/northamerica-northeast1-a/instances/REDACTED-vm-name"
Notice the extra https://.....
It should instead be:
+ id = "projects/REDACTED-project-id/zones/northamerica-northeast1-a/instances/REDACTED-vm-name"
Trying to use this field as a dependency for a resource will of course fail.
Important Factoids
When creating a new VM using a google_compute_instanceresource the id field of the newly created VM is correct.
I can reproduce this on multiple (probably all; tried many) VMs.
Multiple users and service accounts have that problem (all who tried it so far).
I thought this might be some kind of regression so I tried older provider versions and went as far back as v3.0.0 and the id field is always mangled.
For now I did not notice any other field being mangled like this.
The instance's self_link field is correct.
The terraform operation messages also include the mangled id value, e.g.:
data.google_compute_instance.vm: Reading...
data.google_compute_instance.vm: Read complete after 0s [id=projects/REDACTED-project-id/zones/https://www.googleapis.com/compute/v1/projects/REDACTED-project-id/zones/northamerica-northeast1-a/instances/REDACTED-vm-name]
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Community Note
Terraform Version
Terraform v1.2.8
on windows_amd64
NOTE: Issue reproducible on Linux as well.
Affected Resource(s)
Terraform Configuration Files (if applicable)
Issue Description
The VM instance is properly read and available but the
id
field is incorrect (mangled) and looks like this:Excerpt from the plan:
Notice the extra
https://....
.It should instead be:
Trying to use this field as a dependency for a resource will of course fail.
Important Factoids
google_compute_instance
resource theid
field of the newly created VM is correct.id
field is always mangled.self_link
field is correct.id
value, e.g.:The text was updated successfully, but these errors were encountered: