-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 billing_project
configuration to the provider
#3886
Add billing_project
configuration to the provider
#3886
Conversation
Hello! I am a robot who works on Magic Modules PRs. I have detected that you are a community contributor, so your PR will be assigned to someone with a commit-bit on this repo for initial review. Thanks for your contribution! A human will be with you soon. @rileykarson, please review this PR or find an appropriate assignee. |
The env variable is set in both provider.go and provider-test.go
|
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 18 files changed, 458 insertions(+), 15 deletions(-)) |
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.
This seems like a reasonable approach! Right now it's presented as an alternative sourcing mechanism for supports_indirect_user_project_override
, but I think we can use the provider-level billing_project
resource across all resources regardless of whether they support a direct/indirect project or no project (like ACM).
I'll provide some more specific comments inline, but broadly:
- This should take priority over direct/indirect projects, since it's a dedicated field. If a user specified it, we should prefer it.
- All MM-generated resources should be able to use it. We don't need to lock it behind
supports_indirect_user_project_override
.
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 160 files changed, 4622 insertions(+), 665 deletions(-)) |
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.
Broadly looks good in resource.erb
! Left a couple more minor comments.
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.
Oh, whoops, I didn't reply to the VCR comment. Unfortunately we're unable to run those locally. Since they contain secrets, we're also unable to run them on community contributions or to share logs. The way you ran the tests in #3886 (comment) should be sufficient.
You're passing our Cloud Build CI right now (this one doesn't run integration tests, though) other than some of the testing-related code that isn't being used anywhere triggering a linter error. We can get to that on my next review pass- I need to double check with a teammate how well our CI can test this stuff. It generally runs as a service account, but there may be a way to run an interactive account too that I'm not aware of.
I was looking for the debug logs but I figured how to get them by prepending It is not setting the header. I'll investigate and update the PR if I can't figure it out. |
I think we are good to go.
|
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 161 files changed, 4634 insertions(+), 665 deletions(-)) |
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 161 files changed, 3751 insertions(+), 665 deletions(-)) |
third_party/terraform/website/docs/guides/provider_reference.html.markdown
Outdated
Show resolved
Hide resolved
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 160 files changed, 3872 insertions(+), 673 deletions(-)) |
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 160 files changed, 3868 insertions(+), 666 deletions(-)) |
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 164 files changed, 3892 insertions(+), 666 deletions(-)) |
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.
Sorry for the delay in getting back, I had a busy end of last week! Just one last thing about how we're writing the billingProject
value, I think.
Lint and acceptance tests are passing 😃 |
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 164 files changed, 5670 insertions(+), 663 deletions(-)) |
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. Thanks for your collaboration when making changes to how this PR ended up- the billing_project
field works consistently across the majority of the provider's resources, and simplified the custom logic in google_cloud_asset_feed!
billing_project
configuration to the provider
Yeah, we solved it for all future APIs that don't play nice with User ADCs |
Fixes: hashicorp/terraform-provider-google#6747
This PR introduces a new field in the provider
billing_project
and amends ACM Products to support User ADCs.I took a few ideas from how the cloud_feed
I'm stuck on testing it properly.
If this PR is for Terraform, I acknowledge that I have:
make test
andmake lint
to ensure it passes unit and linter tests.Release Note Template for Downstream PRs (will be copied)