Skip to content

Send billing_project for every request when set#5086

Merged
rileykarson merged 4 commits intoGoogleCloudPlatform:masterfrom
rileykarson:client-option
Aug 18, 2021
Merged

Send billing_project for every request when set#5086
rileykarson merged 4 commits intoGoogleCloudPlatform:masterfrom
rileykarson:client-option

Conversation

@rileykarson
Copy link
Copy Markdown
Member

Upstream of hashicorp/terraform-provider-google#9636, making up for some churn in headers since then and fixing up some documentation that's become fairly stale

This means that more resources will send the project override header, requiring additional permissions on the quota project. I believe that's fine, and safe- the only way a user could run into issues is if they've enabled user_project_override, defined a billing_project, are using no resources that already supported a billing project (all MMv1 resources, 70%+ of total), and have not granted the appropriate permission to their credentials.

If this PR is for Terraform, I acknowledge that I have:

  • Searched through the issue tracker for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
  • Generated Terraform, and ran make test and make lint to ensure it passes unit and linter tests.
  • Ensured that all new fields I added that can be set by a user appear in at least one example (for generated resources) or third_party test (for handwritten resources or update tests).
  • Ran relevant acceptance tests (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • Read the Release Notes Guide before writing my release note below.

Release Note Template for Downstream PRs (will be copied)

provider: added support for `billing_project` across all resources. If `user_project_override` is set to `true` and a `billing_project` is set, the `X-Goog-User-Project` header will be sent for all resources.

@rileykarson rileykarson requested review from a team and c2thorn and removed request for a team August 13, 2021 11:28
@google-cla google-cla bot added the cla: yes label Aug 13, 2021
@modular-magician
Copy link
Copy Markdown
Collaborator

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

Diff report:

Terraform GA: Diff ( 2 files changed, 47 insertions(+), 31 deletions(-))
Terraform Beta: Diff ( 2 files changed, 47 insertions(+), 31 deletions(-))
TF Conversion: Diff ( 1 file changed, 7 insertions(+))

Copy link
Copy Markdown
Member

@c2thorn c2thorn left a comment

Choose a reason for hiding this comment

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

magician is adding a duplicate composer import?

Copy link
Copy Markdown
Contributor

@ericnorris ericnorris left a comment

Choose a reason for hiding this comment

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

This looks good to me! Looking forward to seeing this get merged, thanks for taking the time to upstream it.

@rileykarson
Copy link
Copy Markdown
Member Author

Hmm- not sure why the import is getting added. Running again.

/gcbrun

@modular-magician
Copy link
Copy Markdown
Collaborator

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

Diff report:

Terraform GA: Diff ( 2 files changed, 47 insertions(+), 31 deletions(-))
Terraform Beta: Diff ( 2 files changed, 47 insertions(+), 31 deletions(-))
TF Conversion: Diff ( 1 file changed, 7 insertions(+))

@modular-magician
Copy link
Copy Markdown
Collaborator

Error trying to cancel build ()

@modular-magician
Copy link
Copy Markdown
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, 47 insertions(+), 32 deletions(-))
Terraform Beta: Diff ( 3 files changed, 47 insertions(+), 32 deletions(-))
TF Conversion: Diff ( 1 file changed, 7 insertions(+))

@modular-magician
Copy link
Copy Markdown
Collaborator

Error trying to cancel build ()

1 similar comment
@modular-magician
Copy link
Copy Markdown
Collaborator

Error trying to cancel build ()

@modular-magician
Copy link
Copy Markdown
Collaborator

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

Diff report:

Terraform GA: Diff ( 2 files changed, 46 insertions(+), 31 deletions(-))
Terraform Beta: Diff ( 2 files changed, 46 insertions(+), 31 deletions(-))
TF Conversion: Diff ( 1 file changed, 7 insertions(+))

@modular-magician
Copy link
Copy Markdown
Collaborator

Error trying to cancel build ()

2 similar comments
@modular-magician
Copy link
Copy Markdown
Collaborator

Error trying to cancel build ()

@modular-magician
Copy link
Copy Markdown
Collaborator

Error trying to cancel build ()

@rileykarson
Copy link
Copy Markdown
Member Author

Reconfirmed locally that I see the correct project associations, given I modified the code during the upstreaming.

@modular-magician
Copy link
Copy Markdown
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccComposerEnvironment_update|TestAccComposerEnvironment_withSoftwareConfig You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=201766

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests failed during RECORDING mode: TestAccComposerEnvironment_withSoftwareConfig|TestAccComposerEnvironment_update Please fix these to complete your PR

khajduczenia pushed a commit to khajduczenia/magic-modules that referenced this pull request Oct 12, 2021
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.

4 participants