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

Add usage_period fields to billing_budget resource #4429

Conversation

modular-magician
Copy link
Collaborator

Adds in the usage_period fields calendar_period and custom_period to the google_billing_budget resource.

Fixes hashicorp/terraform-provider-google#10753
Fixes hashicorp/terraform-provider-google#9196

Also corrected some documentation errors with correct wording from public docs for creditTypes description. There are some additional documentation fixes needed, such as hashicorp/terraform-provider-google#9458

This PR is in draft as there are some outstanding issues I need assistance with:

  • Removing the budget_filter block will not reset filters to default values. Conversely, if default values are set or computed for calendar_period, errors can occur when trying to change from calendar_period to custom_period, as terraform won't unset the calendar_period property. Perhaps a custom_flatten or custom_expand is needed but nothing I have tried has worked thus far.
  • Validation for integer values in custom_period

Marking this PR as draft to hopefully get some feedback on the above items.

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)

billing: Added `calendar_period` and `custom_period` fields to `google_billing_budget`

Derived from GoogleCloudPlatform/magic-modules#6099

Signed-off-by: Modular Magician <magic-modules@google.com>
@modular-magician modular-magician merged commit 803c4bc into hashicorp:main Jun 30, 2022
@modular-magician modular-magician deleted the downstream-pr-1266bcdc5a21fd3141c48b4023b1821c81c32e79 branch November 16, 2024 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant