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 creation failing with "invalid argument" #5172

Closed
clebio opened this issue Dec 14, 2019 · 3 comments
Closed

Project creation failing with "invalid argument" #5172

clebio opened this issue Dec 14, 2019 · 3 comments

Comments

@clebio
Copy link

clebio commented Dec 14, 2019

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 version
Terraform v0.12.18
+ provider.google v3.2.0
+ provider.random v2.2.1

Affected Resource(s)

  • google_project_service
  • google_project

Terraform Configuration Files

variable "billing_account_id" {
  description = "Billing account to use"
}

variable "org_id" {
  description = "Organization ID"
}

provider "google" {
  region = "us-central1"
}

terraform {
  required_version = "~> 0.12"
  required_providers {
    google = ">= 3.2.0"
  }
}

resource "random_id" "id" {
  byte_length = 4
}

resource "google_project" "main" {
  name            = "repro-${random_id.id.hex}"
  project_id      = "repro-${random_id.id.hex}"
  org_id          = var.org_id
  billing_account = var.billing_account_id
}

resource "google_project_iam_member" "project" {
  project = google_project.main.id
  role    = "roles/owner"
  member  = "user:[email protected]"
}

resource "google_project_service" "project" {
  project  = google_project.main.id
  service = "oslogin.googleapis.com"
}

Debug Output

https://gist.github.com/clebio/b44fbc995c4cd3a3db8b3b6b5a0fe82a

Panic Output

Expected Behavior

apply should succeed

Actual Behavior

Error and failed apply

Steps to Reproduce

  1. create terraform file with the contents above
  2. terrform init
  3. terraform apply

Important Factoids

I created a project in this manner about a week ago, without issue.

References

Seems related:

@ghost ghost added the bug label Dec 14, 2019
@pradeepbhadani
Copy link
Contributor

@clebio Can you update project = google_project.project.id to project = google_project.project.project_id ?

Also, could you please paste the output of terraform graph and terraform plan ?

It seems like google_project_service is not waiting for google_project.project to finish.

@clebio
Copy link
Author

clebio commented Dec 17, 2019

@pradeepbhadani , I think you're right. That seems to have fixed this for me. Thanks!

@clebio clebio closed this as completed Dec 17, 2019
@ghost
Copy link

ghost commented Mar 28, 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 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants