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

credit_types and subaccounts in google_billing_budget should not have the property default_from_api #13456

Open
zli82016 opened this issue Jan 11, 2023 · 0 comments
Labels
breaking-change forward/linked persistent-bug Hard to diagnose or long lived bugs for which resolutions are more like feature work than bug work service/billingbudgets

Comments

@zli82016
Copy link
Collaborator

zli82016 commented Jan 11, 2023

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
  • If an issue is assigned to the modular-magician user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to hashibot, a community member has claimed the issue already.

Terraform Version

Affected Resource(s)

  • google_billing_budget

Terraform Configuration Files

# Copy-paste your Terraform configurations here.
#
# For large Terraform configs, please use a service like Dropbox and share a link to the ZIP file.
# For security, you can also encrypt the files using our GPG public key:
#    https://www.hashicorp.com/security
#
# If reproducing the bug involves modifying the config file (e.g., apply a config,
# change a value, apply the config again, see the bug), then please include both:
# * the version of the config before the change, and
# * the version of the config after the change.

Debug Output

Panic Output

Expected Behavior

The property default_from_api for the two fields credit_types and subaccounts are not needed, as there is no default value for them in API side.
https://github.com/GoogleCloudPlatform/magic-modules/blob/main/mmv1/products/billingbudget/terraform.yaml#L96-L97
https://github.com/GoogleCloudPlatform/magic-modules/blob/main/mmv1/products/billingbudget/terraform.yaml#L109-L110

default_from_api means Computed + Optional. Computed property prevents the fields to be removed from config, so it needs to be removed. But the change from C + O to O is a breaking change. So we need to make the change in a major release.

  1. Remove default_from_api for these two fields
    https://github.com/GoogleCloudPlatform/magic-modules/blob/main/mmv1/products/billingbudget/terraform.yaml#L96-L97
    https://github.com/GoogleCloudPlatform/magic-modules/blob/main/mmv1/products/billingbudget/terraform.yaml#L111-L112
  2. Remove the notes for these two fields
    https://github.com/GoogleCloudPlatform/magic-modules/blob/main/mmv1/products/billingbudget/api.yaml#L128
    https://github.com/GoogleCloudPlatform/magic-modules/blob/main/mmv1/products/billingbudget/api.yaml#L148
  3. Remove empty array for these two fields in tests
    https://github.com/GoogleCloudPlatform/magic-modules/blob/main/mmv1/third_party/terraform/tests/resource_billing_budget_test.go#L220
    https://github.com/GoogleCloudPlatform/magic-modules/blob/main/mmv1/third_party/terraform/tests/resource_billing_budget_test.go#L471

Actual Behavior

Steps to Reproduce

  1. terraform apply

Important Factoids

References

  • b/293326619
@zli82016 zli82016 added the bug label Jan 11, 2023
@rileykarson rileykarson added this to the Future Major Release milestone Feb 1, 2023
@rileykarson rileykarson added persistent-bug Hard to diagnose or long lived bugs for which resolutions are more like feature work than bug work and removed bug labels Mar 6, 2023
@c2thorn c2thorn modified the milestones: 5.0.0, Future Major Release Sep 21, 2023
@c2thorn c2thorn modified the milestones: 6.0.0, Future Major Release Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change forward/linked persistent-bug Hard to diagnose or long lived bugs for which resolutions are more like feature work than bug work service/billingbudgets
Projects
None yet
Development

No branches or pull requests

4 participants