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

project field is both required and cannot be set on data.google_compute_network_endpoint_group [schrodinger state] #6884

Closed
ahmadnassri opened this issue Jul 29, 2020 · 2 comments · Fixed by GoogleCloudPlatform/magic-modules#3801, #6918 or hashicorp/terraform-provider-google-beta#2324
Assignees
Labels

Comments

@ahmadnassri
Copy link

ahmadnassri commented Jul 29, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
  • If an issue is assigned to the modular-magician user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to hashibot, a community member has claimed the issue already.

Terraform Version

$ terraform -v
Terraform v0.12.26
provider.google v3.26.0

Affected Resource(s)

  • data.google_compute_network_endpoint_group

Terraform Configuration Files

data "google_compute_network_endpoint_group" neg {
  for_each = {
    for name, project in var.projects : name => project.services.appengine
  }

  name = "${each.key}-neg"
  zone = local.zone
  # project     = google_project.project[each.key].project_id
}

Debug Output

without project set

2020-07-29T14:44:34.932-0400 [DEBUG] plugin.terraform-provider-google_v3.26.0_x5: 2020/07/29 14:44:34 [DEBUG] Retry Transport: Stopping retries, last request was successful
2020-07-29T14:44:34.932-0400 [DEBUG] plugin.terraform-provider-google_v3.26.0_x5: 2020/07/29 14:44:34 [DEBUG] Retry Transport: Returning after 1 attempts
2020/07/29 14:44:34 [TRACE] module.gcp: eval: *terraform.EvalWriteState
2020/07/29 14:44:34 [TRACE] EvalWriteState: recording 3 dependencies for module.gcp.google_secret_manager_secret_version.vpc-host["legacy-node"]
2020/07/29 14:44:34 [TRACE] EvalWriteState: writing current state object for module.gcp.google_secret_manager_secret_version.vpc-host["legacy-node"]
2020/07/29 14:44:34 [TRACE] [walkRefresh] Exiting eval tree: module.gcp.google_secret_manager_secret_version.vpc-host["legacy-node"]
2020/07/29 14:44:34 [TRACE] vertex "module.gcp.google_secret_manager_secret_version.vpc-host[\"legacy-node\"]": visit complete
2020/07/29 14:44:34 [TRACE] dag/walk: visiting "root"
2020/07/29 14:44:34 [TRACE] vertex "root": starting visit (terraform.graphNodeRoot)
2020/07/29 14:44:34 [TRACE] vertex "root": visit complete
2020/07/29 14:44:34 [TRACE] vertex "module.gcp.google_secret_manager_secret_version.vpc-host": dynamic subgraph completed successfully
2020/07/29 14:44:34 [TRACE] vertex "module.gcp.google_secret_manager_secret_version.vpc-host": visit complete
2020/07/29 14:44:34 [TRACE] dag/walk: upstream of "module.gcp.provider.google (close)" errored, so skipping
2020/07/29 14:44:34 [TRACE] dag/walk: upstream of "root" errored, so skipping

Error: project: required field is not set

  on module/main.tf line 274, in data "google_compute_network_endpoint_group" "neg":
 274: data "google_compute_network_endpoint_group" neg {



Error: project: required field is not set

  on module/main.tf line 274, in data "google_compute_network_endpoint_group" "neg":
 274: data "google_compute_network_endpoint_group" neg {


2020-07-29T14:44:35.056-0400 [DEBUG] plugin: plugin process exited: path=/home/ahmad/Projects/hashtagpaid/terraform-gcp/.terraform/plugins/linux_amd64/terraform-provider-google_v3.26.0_x5 pid=4256
2020-07-29T14:44:35.056-0400 [DEBUG] plugin: plugin exited

with project set

2020/07/29 14:45:52 [TRACE] dag/walk: upstream of "module.gcp.provider.google (close)" errored, so skipping
2020-07-29T14:45:52.420-0400 [DEBUG] plugin: plugin process exited: path=/usr/local/bin/terraform pid=4393
2020-07-29T14:45:52.420-0400 [DEBUG] plugin: plugin exited
2020/07/29 14:45:52 [TRACE] [walkValidate] Exiting eval tree: provisioner.local-exec (close)
2020/07/29 14:45:52 [TRACE] vertex "provisioner.local-exec (close)": visit complete
2020/07/29 14:45:52 [TRACE] dag/walk: upstream of "root" errored, so skipping

Error: "project": this field cannot be set

  on module/main.tf line 274, in data "google_compute_network_endpoint_group" "neg":
 274: data "google_compute_network_endpoint_group" neg {


2020-07-29T14:45:52.534-0400 [DEBUG] plugin: plugin process exited: path=/home/ahmad/Projects/hashtagpaid/terraform-gcp/.terraform/plugins/linux_amd64/terraform-provider-google_v3.26.0_x5 pid=4448
2020-07-29T14:45:52.534-0400 [DEBUG] plugin: plugin exited

Panic Output

Expected Behavior

The docs indicate that you should be able to set project property on the data.google_compute_network_endpoint_group ...

however, setting it results in error, and not setting it (while not having a provider-wide project) doesn't work either.

Actual Behavior

project is stuck in a schrodinger state, where it can included or excluded.

Steps to Reproduce

  1. terraform plan

Important Factoids

References

@ghost ghost added the bug label Jul 29, 2020
@edwardmedia edwardmedia self-assigned this Jul 29, 2020
@edwardmedia
Copy link
Contributor

I do receive error if I set project in the config. (Using environment variable works)

@ghost
Copy link

ghost commented Sep 3, 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 Sep 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.