-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
support billing_project for google_project_service
#5215
support billing_project for google_project_service
#5215
Conversation
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 4 files changed, 75 insertions(+), 15 deletions(-)) |
I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccComputeManagedSslCertificate_managedSslCertificateBasicExample|TestAccComputeServiceAttachment_serviceAttachmentBasicExample You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=206307 |
Tests failed during RECORDING mode: TestAccComputeServiceAttachment_serviceAttachmentBasicExample Please fix these to complete your PR |
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 4 files changed, 76 insertions(+), 15 deletions(-)) |
mmv1/third_party/terraform/resources/resource_google_project.go
Outdated
Show resolved
Hide resolved
…-modules into fix-service-usage-403
google_project_service
google_project_service
/gcbrun |
1 similar comment
/gcbrun |
@@ -212,7 +225,13 @@ func resourceGoogleProjectCheckPreRequisites(config *Config, d *schema.ResourceD | |||
return fmt.Errorf("missing permission on %q: %v", ba, perm) | |||
} | |||
if !d.Get("auto_create_network").(bool) { | |||
_, err := config.NewServiceUsageClient(userAgent).Services.Get("projects/00000000000/services/serviceusage.googleapis.com").Do() | |||
call := config.NewServiceUsageClient(userAgent).Services.Get("projects/00000000000/services/serviceusage.googleapis.com") |
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.
unsure if this call needs billing project passed. I am unsure of the exact purpose here.
@rileykarson
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.
I believe it does!
/gcbrun |
I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccComputeServiceAttachment_serviceAttachmentBasicExampleUpdate|TestAccComputeServiceAttachment_serviceAttachmentBasicExample You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=207247 |
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.
I ended up in a veritable rabbit hole during review on this! Comments inline, tl;dr our documentation lied and this resource behaves even more weirdly than expected.
@@ -212,7 +225,13 @@ func resourceGoogleProjectCheckPreRequisites(config *Config, d *schema.ResourceD | |||
return fmt.Errorf("missing permission on %q: %v", ba, perm) | |||
} | |||
if !d.Get("auto_create_network").(bool) { | |||
_, err := config.NewServiceUsageClient(userAgent).Services.Get("projects/00000000000/services/serviceusage.googleapis.com").Do() | |||
call := config.NewServiceUsageClient(userAgent).Services.Get("projects/00000000000/services/serviceusage.googleapis.com") |
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.
I believe it does!
I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDatasourceGoogleServiceNetworkingPeeredDnsDomain_basic|TestAccComputeManagedSslCertificate_managedSslCertificateBasicExample|TestAccServiceNetworkingPeeredDNSDomain_basic You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=210261 |
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.
Alright, I think this LGTM.
It could be worth playing through a few scenarios locally, and making sure the billing project being used is the right one. I've found that an extremely useful verification on similar changes- making myself enumerate the obvious scenarios will end up with me checking up on a less obvious one!
helps with hashicorp/terraform-provider-google#9489
Release Note Template for Downstream PRs (will be copied)