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's budget_filter does not apply credit_types_treatment changes #12886

Assignees
Labels

Comments

@cberenik
Copy link

cberenik commented Oct 26, 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

1.3.3

Affected Resource(s)

  • google_billing_budget > budget_filter > credit_types_treatment

Terraform Configuration Files

resource "google_billing_budget" "spanner_budget" {
  billing_account = data.google_billing_account.account.id
  display_name    = "Spanner Budget"
  amount {
    specified_amount {
      currency_code = "USD"
      units         = "1000"
    }
  }

  budget_filter {
    services               = ["services/CC63-0873-48FD"]
    credit_types_treatment = "INCLUDE_ALL_CREDITS"
  }

  all_updates_rule {
    pubsub_topic = "projects/my-project/topics/my-topic"
  }
  threshold_rules {
    threshold_percent = 1.0
  }
}

Expected Behavior

terraform apply should update google_billing_budget > budget_filter > credit_types_treatment to "INCLUDE_ALL_CREDITS" as shown in the plan:

Waiting for the plan to start...

Terraform v1.3.3
on linux_amd64
Initializing plugins and modules...

...

# google_billing_budget.spanner_budget will be updated in-place
  ~ resource "google_billing_budget" "spanner_budget" {
        id              = "billingAccounts/my-account/budgets/my-budget"
        name            = "my-budget"
        # (2 unchanged attributes hidden)

      ~ budget_filter {
          ~ credit_types_treatment = "EXCLUDE_ALL_CREDITS" -> "INCLUDE_ALL_CREDITS"
            # (5 unchanged attributes hidden)
        }

        # (3 unchanged blocks hidden)
    }

Actual Behavior

terraform apply does not change the budget, despite terraform plan showing that it plans to change the credit type. See gist for apply state output: https://gist.github.com/cberenik-va/bc04fa00613649a7fdd7193022e9bd7d

Steps to Reproduce

  1. Have a project with a GCP budget with a budget similar to above defined, with credit_types_treatment = "EXCLUDE_ALL_CREDITS" (or vice versa, either way doesn't work)
  2. Change to credit_types_treatment = "INCLUDE_ALL_CREDITS"
  3. terraform plan - see that credit_types_treatment is planned for update
  4. terraform apply - credit_types_treatment has not changed

Important Factoids

  • We use terraform cloud
  • We also changed amount > specified_amount > units and it was applied successfully
@github-actions
Copy link

github-actions bot commented Dec 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 Dec 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.