Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

google_compute_subnetwork missing project & region attributes #159

Closed
pdbogen opened this issue Jun 26, 2017 · 1 comment · Fixed by #687
Closed

google_compute_subnetwork missing project & region attributes #159

pdbogen opened this issue Jun 26, 2017 · 1 comment · Fixed by #687
Labels

Comments

@pdbogen
Copy link

pdbogen commented Jun 26, 2017

Terraform Version

v0.9.8

Affected Resource(s)

google_compute_subnetwork, maybe others

Terraform Configuration Files

provider "google" {
  credentials = "${file("/home/pdbogen/.gce/account.json")}"
  project = "REDACTED"
  region  = "us-west1"
}

data "google_compute_subnetwork" "sn" {
  name = "default"
}

resource "google_compute_instance" "i" {
  name = "repro-test"
  zone = "${data.google_compute_subnetwork.sn.region}-a"
  machine_type = "n1-standard-1"
}

Debug Output

https://gist.github.com/pdbogen/71ee3cfec7aa69136b7ef080564695ed

Panic Output

N/A

Expected Behavior

data.google_compute_subnetwork.sn.region should interpolate into the name of the region that the subnetwork is assigned to.

Actual Behavior

Terraform produces an error message:

Error running plan: 1 error(s) occurred:

2017/06/26 16:25:59 [DEBUG] plugin: waiting for all plugin processes to complete...
* google_compute_instance.i: 1 error(s) occurred:

2017/06/26 16:25:59 [DEBUG] plugin: terraform: google-provider (internal) 2017/06/26 16:25:59 [DEBUG] plugin: waiting for all plugin processes to complete...
* google_compute_instance.i: Resource 'data.google_compute_subnetwork.sn' does not have attribute 'region' for variable 'data.google_compute_subnetwork.sn.region'

Steps to Reproduce

  1. terraform plan

Important Factoids

N/A

References

I checked briefly but couldn't find anything related.

@ghost
Copy link

ghost commented Mar 30, 2020

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 ghost locked and limited conversation to collaborators Mar 30, 2020
@github-actions github-actions bot added forward/review In review; remove label to forward service/compute-vpc labels Jan 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants