Skip to content

Commit

Permalink
Fix bug with importing bq capacity commitments
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisst committed Apr 5, 2023
1 parent 18d31e0 commit e60f3f3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 3 additions & 5 deletions mmv1/products/bigqueryreservation/CapacityCommitment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
name: 'CapacityCommitment'
base_url: projects/{{project}}/locations/{{location}}/capacityCommitments
create_url: projects/{{project}}/locations/{{location}}/capacityCommitments?capacityCommitmentId={{capacity_commitment_id}}
self_link: "{{name}}"
self_link: "projects/{{project}}/locations/{{location}}/capacityCommitments/{{capacity_commitment_id}}"
update_verb: :PATCH
update_mask: true
description: |
Expand All @@ -26,8 +26,8 @@ references: !ruby/object:Api::Resource::ReferenceLinks
guides:
"Introduction to Reservations": "https://cloud.google.com/bigquery/docs/reservations-intro"
api: "https://cloud.google.com/bigquery/docs/reference/reservations/rest/v1/projects.locations.capacityCommitments"
id_format: "{{name}}"
import_format: ["{{name}}"]
id_format: "projects/{{project}}/locations/{{location}}/capacityCommitments/{{capacity_commitment_id}}"
import_format: ["projects/{{project}}/locations/{{location}}/capacityCommitments/{{capacity_commitment_id}}"]
examples:
- !ruby/object:Provider::Terraform::Examples
name: "bigquery_reservation_capacity_commitment_basic"
Expand All @@ -37,8 +37,6 @@ examples:
- !ruby/object:Provider::Terraform::Examples
name: "bigquery_reservation_capacity_commitment_docs"
skip_test: true
custom_code: !ruby/object:Provider::Terraform::CustomCode
custom_import: templates/terraform/custom_import/self_link_as_name.erb
parameters:
- !ruby/object:Api::Type::String
name: 'capacityCommitmentId'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
resource "google_bigquery_capacity_commitment" "<%= ctx[:primary_resource_id] %>" {
capacity_commitment_id = "capacity-tf-test%{random_suffix}"

location = "us-west2"
slot_count = 100
plan = "FLEX_FLAT_RATE"
Expand Down

0 comments on commit e60f3f3

Please sign in to comment.