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

support billing_project for google_project_service #5215

Merged

Conversation

ScottSuarez
Copy link
Contributor

@ScottSuarez ScottSuarez commented Sep 17, 2021

helps with hashicorp/terraform-provider-google#9489

Release Note Template for Downstream PRs (will be copied)

project: support `billing_project` for `google_project_service`

@modular-magician
Copy link
Collaborator

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(-))
Terraform Beta: Diff ( 4 files changed, 75 insertions(+), 15 deletions(-))
TF Conversion: Diff ( 1 file changed, 14 insertions(+))

@modular-magician
Copy link
Collaborator

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

@modular-magician
Copy link
Collaborator

Tests failed during RECORDING mode: TestAccComputeServiceAttachment_serviceAttachmentBasicExample Please fix these to complete your PR

@modular-magician
Copy link
Collaborator

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(-))
Terraform Beta: Diff ( 5 files changed, 77 insertions(+), 16 deletions(-))
TF Conversion: Diff ( 1 file changed, 15 insertions(+))

@ScottSuarez ScottSuarez changed the title retry on service usage 403 and support billing_project for google_project_service support billing_project for google_project_service Sep 21, 2021
@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 60 insertions(+), 15 deletions(-))
Terraform Beta: Diff ( 3 files changed, 60 insertions(+), 15 deletions(-))

@ScottSuarez
Copy link
Contributor Author

/gcbrun

1 similar comment
@ScottSuarez
Copy link
Contributor Author

/gcbrun

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 60 insertions(+), 15 deletions(-))
Terraform Beta: Diff ( 4 files changed, 61 insertions(+), 17 deletions(-))

@@ -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")
Copy link
Contributor Author

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

Copy link
Member

Choose a reason for hiding this comment

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

I believe it does!

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 5 files changed, 84 insertions(+), 30 deletions(-))
Terraform Beta: Diff ( 4 files changed, 84 insertions(+), 29 deletions(-))

@ScottSuarez
Copy link
Contributor Author

/gcbrun

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 4 files changed, 84 insertions(+), 29 deletions(-))
Terraform Beta: Diff ( 6 files changed, 86 insertions(+), 32 deletions(-))

@modular-magician
Copy link
Collaborator

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

Copy link
Member

@rileykarson rileykarson left a 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")
Copy link
Member

Choose a reason for hiding this comment

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

I believe it does!

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 4 files changed, 86 insertions(+), 32 deletions(-))
Terraform Beta: Diff ( 5 files changed, 87 insertions(+), 33 deletions(-))

@modular-magician
Copy link
Collaborator

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

Copy link
Member

@rileykarson rileykarson left a 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants