-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add tags
field to Project resource
#11440
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 tags
field to Project resource
#11440
Conversation
72f6f22
to
e798959
Compare
tags
field to Project resource
Hello! I am a robot. Tests will require approval from a repository maintainer to run. @rileykarson, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look. You can help make sure that review is quick by doing a self-review and by running impacted tests locally. |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_project" "primary" {
tags = # value needed
}
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_project" "primary" {
tags = # value needed
}
|
1 similar comment
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_project" "primary" {
tags = # value needed
}
|
Tests analyticsTotal tests: 145 Click here to see the affected service packages
Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
|
Tests analyticsTotal tests: 145 Click here to see the affected service packages
Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
@rileykarson The test passes on local, but would need help from TF team to add the tags resource in the test organization and provide tag admin permission to VCR test user. |
|
Tests analyticsTotal tests: 145 Click here to see the affected service packages
Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you create the TagKey inline in the test? We can't scalably manage our environments manually and prefer tests to own their dependencies (and in some rare cases have code to manage bootstrapping them, which this shouldn't need).
Hi @rileykarson, I have made changes for inline creation however the test seems to fail in post-destroy because it takes some time for tag binding deletion when delete resource is called...hence delete tag value fails in post test destroy. Is it necessary to bootstrap in this case? |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_project" "primary" {
tags = # value needed
}
|
Tests analyticsTotal tests: 145 Click here to see the affected service packages
Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
|
@rileykarson This PR has been waiting for review for 3 weekdays. Please take a look! Use the label |
@GoogleCloudPlatform/terraform-team @rileykarson This PR has been waiting for review for 1 week. Please take a look! Use the label |
Tests analyticsTotal tests: 3921 Click here to see the affected service packages
Action takenFound 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
Tests failed due to non-determinism or randomness when the VCR replayed the response after the HTTP request was made. Please fix these to complete your PR. If you believe these test failures to be incorrect or unrelated to your change, or if you have any questions, please raise the concern with your reviewer. |
Rolling a new reviewer- I've been underwater on reviews, sorry! |
Do you know how long will the tag binding deletion take? After the project is scheduled to be deleted, when the tags can be deleted by the users? |
TagBindings can take upto 24 hours or more for automatic deletions(binding deletions triggered by resource deletion). |
@zli82016 the testing is now supported by bootstrapped tagkeys and tagvalues so the deletion delay isn't an issue anymore. |
Can you help understand the reason that it takes some time for tagbinding automatic deletion? I just tested it locally. After the project is scheduled to be deleted, the tagbinding can be deleted by calling the API immediately. Some users will complain that they have to wait to delete the tags. |
I see, but it is still a concern for the users, as the users have to wait to delete the tags. |
That is expected product behavior as of now though. So there's nothing that be done from Terraform's end to modify this behavior. |
Thanks for the information. Do you mind adding a note that the deletion of tagbinding may take some time after the project is scheduled to be deleted in the doc magic-modules/mmv1/third_party/terraform/website/docs/r/google_project.html.markdown Line 22 in 3a8cd91 Also, do you mind adding an example to use the tags to the doc https://github.com/GoogleCloudPlatform/magic-modules/blob/3a8cd91f6603e2b464822646d11cbaab1f2b917f/mmv1/third_party/terraform/website/docs/r/google_project.html.markdown? Thanks. |
mmv1/third_party/terraform/services/resourcemanager/resource_google_project.go
Show resolved
Hide resolved
mmv1/third_party/terraform/services/resourcemanager/resource_google_project_test.go
Show resolved
Hide resolved
Added both, PTAL. Thanks. |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_project" "primary" {
tags = # value needed
}
|
Tests analyticsTotal tests: 3808 Click here to see the affected service packages
Action takenFound 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
Tests failed due to non-determinism or randomness when the VCR replayed the response after the HTTP request was made. Please fix these to complete your PR. If you believe these test failures to be incorrect or unrelated to your change, or if you have any questions, please raise the concern with your reviewer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The failed tests are unrelated. |
Add tags field to project resource to allow setting tags on project resources at creation time.
Part of b/330143705
Part of hashicorp/terraform-provider-google#18775
Release Note Template for Downstream PRs (will be copied)