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

google_billing_budget services bug #12185

Closed
alanvuong opened this issue Jul 27, 2022 · 3 comments · Fixed by GoogleCloudPlatform/magic-modules#6335, hashicorp/terraform-provider-google-beta#4577 or #12270
Assignees
Labels

Comments

@alanvuong
Copy link

alanvuong commented Jul 27, 2022

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

Terraform v1.2.5
on linux_amd64

  • provider registry.terraform.io/hashicorp/google v4.30.0
  • provider registry.terraform.io/hashicorp/google-beta v4.30.0

Affected Resource(s)

  • google_billing_budget

Terraform Configuration Files

Initial deploy of google_billing_budget is fine. Any subsequent change to services in budget_filter will not be applied, even when terraform confirms Apply complete

resource "google_billing_budget" "devbudget" {
  billing_account = var.billing_account_id
  display_name    = "dev budget"

  budget_filter {
    projects        = ["projects/XXXX"]
    calendar_period = "YEAR"
    services        = ["services/24E6-581D-38E5"]
  }

  amount {
    specified_amount {
      units = "100"
    }
  }

Debug Output

https://gist.github.com/alanvuong/26208f42a43f7f68e105923642c7bddd

Panic Output

Expected Behavior

Changes to the services in budget_filter should be updated in GCP Budgets

Actual Behavior

When changes to services in budget_filter block are made, changes are detected and a confirmation of Apply complete! however there are no actual changes to the google budget. Any other change in the google_billing_budget resource is actioned.

Steps to Reproduce

  1. Create google_billing_budget resource with budget_filter with or without services declared - terraform plan/apply
  2. Modify the same google_billing_budget to add or change services in 'budget_filter'
  3. 'terraform plan` will detect the change
  4. terraform apply will detect and confirm the change was applied
  5. terraform state actually doesn't change and GCP console confirms no changes made to Budget

Important Factoids

References

  • #0000
@alanvuong alanvuong added the bug label Jul 27, 2022
@edwardmedia
Copy link
Contributor

@alanvuong could you share the debug log?

@alanvuong
Copy link
Author

alanvuong commented Jul 27, 2022

updated link to debug in initial post

pre apply: budget had no services defined in budget filter
change was to add a new service to the budget filter.

it doesn't matter if there is a service or not initially defined, you cannot add or change the service lists after a budget is created.

@github-actions
Copy link

github-actions bot commented Sep 5, 2022

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.