Skip to content

Commit

Permalink
added DSF for plan in google_bigquery_capacity_commitment (GoogleClou…
Browse files Browse the repository at this point in the history
  • Loading branch information
shuyama1 authored and ericayyliu committed Jul 26, 2023
1 parent f01ace7 commit 8588285
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mmv1/products/bigqueryreservation/CapacityCommitment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ import_format:
[
'projects/{{project}}/locations/{{location}}/capacityCommitments/{{capacity_commitment_id}}',
]
custom_code: !ruby/object:Provider::Terraform::CustomCode
constants: templates/terraform/constants/bigquery_reservation_capacity_commitment.go.erb
examples:
- !ruby/object:Provider::Terraform::Examples
name: 'bigquery_reservation_capacity_commitment_basic'
Expand Down Expand Up @@ -81,6 +83,7 @@ properties:
required: true
description: |
Capacity commitment plan. Valid values are at https://cloud.google.com/bigquery/docs/reference/reservations/rpc/google.cloud.bigquery.reservation.v1#commitmentplan
diff_suppress_func: bigqueryReservationCapacityCommitmentPlanDiffSuppressFunc
- !ruby/object:Api::Type::String
name: 'state'
output: true
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
func bigqueryReservationCapacityCommitmentPlanDiffSuppressFunc(_, old, new string, _ *schema.ResourceData) bool {
if (old == "FLEX" || old == "MONTHLY" || old == "ANNUAL") && new == old+"_FLAT_RATE" {
return true
}
return false
}

0 comments on commit 8588285

Please sign in to comment.