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

Add support for setting labels to google_project #383

Merged
merged 1 commit into from
Sep 14, 2017

Conversation

rnaveiras
Copy link
Contributor

@rnaveiras rnaveiras commented Sep 3, 2017

This PR adds support for labels in the google_project resource.

e.g.

resource "google_project" "testing" {
  project_id      = "gcp-1234"
  name            = gcp-1234"
  org_id          = "XXXX"
  billing_account = "XXX"

  labels {
    environment = "production"
    app_env     = "staging"
  }
}

Acceptance Tests

make testacc TEST=./google TESTARGS='-run=TestAccGoogleProject_createLabels' GOOGLE_USE_DEFAULT_CREDENTIALS=true
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./google -v -run=TestAccGoogleProject_createLabels -timeout 120m
=== RUN   TestAccGoogleProject_createLabels
--- PASS: TestAccGoogleProject_createLabels (20.29s)
PASS
ok      github.com/terraform-providers/terraform-provider-google/google 20.566s
make testacc TEST=./google TESTARGS='-run=TestAccGoogleProject_updateLabels' GOOGLE_USE_DEFAULT_CREDENTIALS=true
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./google -v -run=TestAccGoogleProject_updateLabels -timeout 120m
=== RUN   TestAccGoogleProject_updateLabels
--- PASS: TestAccGoogleProject_updateLabels (33.45s)
PASS
ok      github.com/terraform-providers/terraform-provider-google/google 33.732s

@rnaveiras rnaveiras changed the title Add support for setting labels to google_project Add support for setting labels to google_project Sep 3, 2017
@rnaveiras rnaveiras force-pushed the rnaveiras-add-labels-to-project branch from 4854e42 to ba7e2cd Compare September 6, 2017 14:52
@rosbo rosbo requested a review from selmanj September 6, 2017 20:56
Copy link
Contributor

@selmanj selmanj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks straightforward!

The test code is a little bit more complex than we normally write it (we tend to write hardcoded keys in a config file and static error messages), but I like how readable it makes the tests!

Will merge once I can verify integration tests pass. Thanks so much for the PR!

@rnaveiras
Copy link
Contributor Author

@selmanj any new on this?

@rosbo
Copy link
Contributor

rosbo commented Sep 14, 2017

Acceptance tests are passing.

TF_ACC=1 go test ./google -v -run TestAccGoogleProject_ -timeout 120m
=== RUN   TestAccGoogleProject_importBasic
--- PASS: TestAccGoogleProject_importBasic (19.04s)
=== RUN   TestAccGoogleProject_create
--- PASS: TestAccGoogleProject_create (17.68s)
=== RUN   TestAccGoogleProject_createBilling
--- PASS: TestAccGoogleProject_createBilling (20.45s)
=== RUN   TestAccGoogleProject_createLabels
--- PASS: TestAccGoogleProject_createLabels (16.28s)
=== RUN   TestAccGoogleProject_merge
--- PASS: TestAccGoogleProject_merge (25.11s)
=== RUN   TestAccGoogleProject_updateLabels
--- PASS: TestAccGoogleProject_updateLabels (25.27s)
PASS
ok  	github.com/terraform-providers/terraform-provider-google/google	103.523s

@selmanj selmanj merged commit eee011f into hashicorp:master Sep 14, 2017
@selmanj
Copy link
Contributor

selmanj commented Sep 14, 2017

Thanks @rnaveiras, sorry for the delay!

@rnaveiras rnaveiras deleted the rnaveiras-add-labels-to-project branch September 15, 2017 17:02
@rnaveiras rnaveiras restored the rnaveiras-add-labels-to-project branch October 6, 2017 09:59
@rnaveiras rnaveiras deleted the rnaveiras-add-labels-to-project branch October 6, 2017 10:00
negz pushed a commit to negz/terraform-provider-google that referenced this pull request Oct 17, 2017
chrisst pushed a commit to chrisst/terraform-provider-google that referenced this pull request Nov 9, 2018
luis-silva pushed a commit to luis-silva/terraform-provider-google that referenced this pull request May 21, 2019
<!-- This change is generated by MagicModules. -->
/cc @chrisst
@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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants