diff --git a/mmv1/products/serviceusage/api.yaml b/mmv1/products/serviceusage/api.yaml index 70a3ebd10c5b..6b73801dfaba 100644 --- a/mmv1/products/serviceusage/api.yaml +++ b/mmv1/products/serviceusage/api.yaml @@ -36,7 +36,7 @@ objects: create_url: projects/{{project}}/services/{{service}}/consumerQuotaMetrics/{{metric}}/limits/{{limit}}/adminOverrides/{{name}}?force={{force}} update_url: projects/{{project}}/services/{{service}}/consumerQuotaMetrics/{{metric}}/limits/{{limit}}/adminOverrides/{{name}} update_verb: :PATCH - delete_url: projects/{{project}}/services/{{service}}/consumerQuotaMetrics/{{metric}}/limits/{{limit}}/adminOverrides/{{name}} + delete_url: projects/{{project}}/services/{{service}}/consumerQuotaMetrics/{{metric}}/limits/{{limit}}/adminOverrides/{{name}}?force={{force}} references: !ruby/object:Api::Resource::ReferenceLinks guides: 'Getting Started': 'https://cloud.google.com/service-usage/docs/manage-quota#create_consumer_quota_override' @@ -123,7 +123,7 @@ objects: create_url: projects/{{project}}/services/{{service}}/consumerQuotaMetrics/{{metric}}/limits/{{limit}}/consumerOverrides/{{name}}?force={{force}} update_url: projects/{{project}}/services/{{service}}/consumerQuotaMetrics/{{metric}}/limits/{{limit}}/consumerOverrides/{{name}}?force={{force}} update_verb: :PATCH - delete_url: projects/{{project}}/services/{{service}}/consumerQuotaMetrics/{{metric}}/limits/{{limit}}/consumerOverrides/{{name}} + delete_url: projects/{{project}}/services/{{service}}/consumerQuotaMetrics/{{metric}}/limits/{{limit}}/consumerOverrides/{{name}}?force={{force}} references: !ruby/object:Api::Resource::ReferenceLinks guides: 'Getting Started': 'https://cloud.google.com/service-usage/docs/getting-started' diff --git a/mmv1/products/serviceusage/terraform.yaml b/mmv1/products/serviceusage/terraform.yaml index 37ec6c5a1841..3ed29561a0e8 100644 --- a/mmv1/products/serviceusage/terraform.yaml +++ b/mmv1/products/serviceusage/terraform.yaml @@ -52,6 +52,14 @@ overrides: !ruby/object:Overrides::ResourceOverrides project_id: "quota" test_env_vars: org_id: :ORG_ID + - !ruby/object:Provider::Terraform::Examples + name: "consumer_quota_override_custom_dimension" + primary_resource_id: "override" + min_version: 'beta' + vars: + project_id: "quota" + test_env_vars: + org_id: :ORG_ID id_format: "projects/{{project}}/services/{{service}}/consumerQuotaMetrics/{{metric}}/limits/{{limit}}/consumerOverrides/{{name}}" import_format: [ "services/{{service}}/consumerQuotaMetrics/{{metric}}/limits/{{limit}}/consumerOverrides/{{name}}", "projects/{{project}}/services/{{service}}/consumerQuotaMetrics/{{metric}}/limits/{{limit}}/consumerOverrides/{{name}}" ] skip_sweeper: true diff --git a/mmv1/templates/terraform/examples/consumer_quota_override_custom_dimension.tf.erb b/mmv1/templates/terraform/examples/consumer_quota_override_custom_dimension.tf.erb new file mode 100644 index 000000000000..156cbecae1ba --- /dev/null +++ b/mmv1/templates/terraform/examples/consumer_quota_override_custom_dimension.tf.erb @@ -0,0 +1,19 @@ +resource "google_project" "my_project" { + provider = google-beta + name = "tf-test-project" + project_id = "<%= ctx[:vars]['project_id'] %>" + org_id = "<%= ctx[:test_env_vars]['org_id'] %>" +} + +resource "google_service_usage_consumer_quota_override" "override" { + provider = google-beta + project = google_project.my_project.project_id + service = "libraryagent.googleapis.com" + metric = urlencode("libraryagent.googleapis.com/borrows") + limit = urlencode("/author/project") + override_value = "1" + force = true + dimensions = { + author = "larry" + } +}