Skip to content

Forces new ressource everytime because of v1 vs beta link #2128

Closed
@jul-scherer

Description

@jul-scherer

Terraform Version

Terraform v0.11.7

Affected Resource(s)

Please list the resources as a list, for example:

  • google_compute_instance_template
  • google_compute_region_disk

Terraform Configuration Files

resource "google_compute_region_disk" "test-disk" {
  name  = "test-app-disk${count.index}"
  type  = "pd-standard"
...
}
resource "google_compute_instance_template" "rp-template" {
  name         = "blablah"
  machine_type = "n1-standard-2"   
  disk {
    source = "${google_compute_region_disk.test-disk.self_link}"
    auto_delete  = false
    boot         = false
  }
....

Expected Behavior

When apply the configuration, nothing must change.

Actual Behavior

Forces new ressource because of the link beta applied vs v1 in the terraform plan
(PS: this is the apply i'm doing at work i didn't put the exact code above)
disk.1.source: https://www.googleapis.com/compute**/beta/**projects/fml-build-infracore/regions/europe-west3/disks/vulture-app-region-disk0" => "https://www.googleapis.com/compute**/v1/**projects/fml-build-infracore/regions/europe-west3/disks/vulture-app-region-disk0"

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. Create ressources google_compute_instance_template and google_compute_region_disk
  2. terraform apply
  3. terraform apply

References

Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions