From 4352f806318be6cd50a3709b5c8997d17ed3071f Mon Sep 17 00:00:00 2001 From: Zhenhua Li Date: Fri, 13 Sep 2024 14:00:48 -0700 Subject: [PATCH] Modify Ruby yaml files to follow the rules to copy comments to Go yaml files --- .../ServicePerimeter.yaml | 2 +- mmv1/products/activedirectory/Domain.yaml | 5 ++-- mmv1/products/apigateway/ApiConfig.yaml | 7 +++--- .../appengine/StandardAppVersion.yaml | 9 ++++--- .../artifactregistry/VPCSCConfig.yaml | 2 +- mmv1/products/cloudidentity/Group.yaml | 5 ++-- .../cloudidentity/GroupMembership.yaml | 10 ++++---- mmv1/products/compute/Address.yaml | 3 +-- mmv1/products/compute/Instance.yaml | 1 - mmv1/products/compute/ResizeRequest.yaml | 20 ++++++---------- mmv1/products/compute/product.yaml | 3 +-- .../containeranalysis/Occurrence.yaml | 5 ++-- mmv1/products/datacatalog/Tag.yaml | 5 ++-- mmv1/products/datacatalog/Taxonomy.yaml | 3 +-- .../deploymentmanager/Deployment.yaml | 15 ++++++------ mmv1/products/dlp/DeidentifyTemplate.yaml | 24 +++++++++---------- mmv1/products/dlp/JobTrigger.yaml | 3 ++- .../documentaiwarehouse/DocumentSchema.yaml | 2 +- .../documentaiwarehouse/Location.yaml | 2 +- mmv1/products/firebase/WebApp.yaml | 2 +- mmv1/products/firestore/Index.yaml | 7 +++--- mmv1/products/monitoring/AlertPolicy.yaml | 8 +++---- mmv1/products/netapp/kmsconfig.yaml | 7 +++--- .../networksecurity/AddressGroup.yaml | 3 +-- mmv1/products/notebooks/README.md | 21 ---------------- .../privateca/CertificateAuthority.yaml | 5 ++-- mmv1/products/securitycenter/Source.yaml | 3 +-- .../securitycenterv2/OrganizationSource.yaml | 3 +-- mmv1/products/sql/product.yaml | 22 ++++++++--------- mmv1/products/storage/HmacKey.yaml | 2 +- mmv1/products/vertexai/Endpoint.yaml | 3 +-- 31 files changed, 85 insertions(+), 127 deletions(-) delete mode 100644 mmv1/products/notebooks/README.md diff --git a/mmv1/products/accesscontextmanager/ServicePerimeter.yaml b/mmv1/products/accesscontextmanager/ServicePerimeter.yaml index 42860f0c5cbd..1775e0d3753d 100644 --- a/mmv1/products/accesscontextmanager/ServicePerimeter.yaml +++ b/mmv1/products/accesscontextmanager/ServicePerimeter.yaml @@ -11,8 +11,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -# This is the singular of `ServicePerimeters`, any changes here should be made to `ServicePerimeters` as well --- !ruby/object:Api::Resource +# This is the singular of `ServicePerimeters`, any changes here should be made to `ServicePerimeters` as well name: 'ServicePerimeter' # This is an unusual API, so we need to use a few fields to map the methods # to the right URL. diff --git a/mmv1/products/activedirectory/Domain.yaml b/mmv1/products/activedirectory/Domain.yaml index 7f8122c9db2c..ca7597c218c8 100644 --- a/mmv1/products/activedirectory/Domain.yaml +++ b/mmv1/products/activedirectory/Domain.yaml @@ -75,9 +75,8 @@ examples: # the part of the domain before the first "." must be <15 chars, and # the random suffix is 10 chars. In order to make sure these get swept, # 'tfgen' is the only option here. - domain_name: - tfgen - # skip the test until Active Directory setup issue got resolved + domain_name: tfgen + # skip the test until Active Directory setup issue got resolved skip_test: true ignore_read_extra: - 'deletion_protection' diff --git a/mmv1/products/apigateway/ApiConfig.yaml b/mmv1/products/apigateway/ApiConfig.yaml index da35b85703d9..eda188f6820f 100644 --- a/mmv1/products/apigateway/ApiConfig.yaml +++ b/mmv1/products/apigateway/ApiConfig.yaml @@ -49,12 +49,11 @@ iam_policy: !ruby/object:Api::Resource::IamPolicy ] examples: - !ruby/object:Provider::Terraform::Examples - min_version: beta name: 'apigateway_api_config_basic' + min_version: beta primary_resource_id: 'api_cfg' - primary_resource_name: 'fmt.Sprintf("tf-test-my-api%s", - context["random_suffix"]), fmt.Sprintf("tf-test-my-config%s", - context["random_suffix"])' # Need to pass 2 ids into a Sprintf - parent resource id also needed to identify primary resource + # Need to pass 2 ids into a Sprintf - parent resource id also needed to identify primary resource + primary_resource_name: 'fmt.Sprintf("tf-test-my-api%s", context["random_suffix"]), fmt.Sprintf("tf-test-my-config%s", context["random_suffix"])' vars: api_id: 'my-api' config_id: 'my-config' diff --git a/mmv1/products/appengine/StandardAppVersion.yaml b/mmv1/products/appengine/StandardAppVersion.yaml index d17dfca95f8b..6729dbe59e6a 100644 --- a/mmv1/products/appengine/StandardAppVersion.yaml +++ b/mmv1/products/appengine/StandardAppVersion.yaml @@ -12,6 +12,10 @@ # limitations under the License. --- !ruby/object:Api::Resource +# StandardAppVersion and FlexibleAppVersion use the same API endpoint (apps.services.versions) +# They are split apart as some of the fields will are necessary for one and not the other, and +# other fields may have different defaults. However, some fields are the same. If fixing a bug +# in one, please check the other for the same fix. name: 'StandardAppVersion' description: | Standard App Version resource to create a new version of standard GAE Application. @@ -438,8 +442,3 @@ properties: **Note:** When managing the number of instances at runtime through the App Engine Admin API or the (now deprecated) Python 2 Modules API set_num_instances() you must use `lifecycle.ignore_changes = ["manual_scaling"[0].instances]` to prevent drift detection. - -# StandardAppVersion and FlexibleAppVersion use the same API endpoint (apps.services.versions) -# They are split apart as some of the fields will are necessary for one and not the other, and -# other fields may have different defaults. However, some fields are the same. If fixing a bug -# in one, please check the other for the same fix. diff --git a/mmv1/products/artifactregistry/VPCSCConfig.yaml b/mmv1/products/artifactregistry/VPCSCConfig.yaml index 6751669c1bb3..2d2326ac4baf 100644 --- a/mmv1/products/artifactregistry/VPCSCConfig.yaml +++ b/mmv1/products/artifactregistry/VPCSCConfig.yaml @@ -32,9 +32,9 @@ update_verb: :PATCH skip_delete: true examples: - !ruby/object:Provider::Terraform::Examples + name: 'artifact_registry_vpcsc_config' # Requires VPC SC Policy configured on organization skip_test: true - name: 'artifact_registry_vpcsc_config' primary_resource_id: 'my-config' autogen_async: false async: !ruby/object:Api::OpAsync diff --git a/mmv1/products/cloudidentity/Group.yaml b/mmv1/products/cloudidentity/Group.yaml index 0fe37e0e21aa..ca115a95acbf 100644 --- a/mmv1/products/cloudidentity/Group.yaml +++ b/mmv1/products/cloudidentity/Group.yaml @@ -40,9 +40,8 @@ import_format: ['{{name}}'] skip_sweeper: true examples: - !ruby/object:Provider::Terraform::Examples - name: - 'cloud_identity_groups_basic' - # Has a handwritten test due to CloudIdentityGroup-related tests needing to run synchronously + name: 'cloud_identity_groups_basic' + # Has a handwritten test due to CloudIdentityGroup-related tests needing to run synchronously skip_test: true primary_resource_id: 'cloud_identity_group_basic' vars: diff --git a/mmv1/products/cloudidentity/GroupMembership.yaml b/mmv1/products/cloudidentity/GroupMembership.yaml index bca79a961574..8463e490165e 100644 --- a/mmv1/products/cloudidentity/GroupMembership.yaml +++ b/mmv1/products/cloudidentity/GroupMembership.yaml @@ -34,9 +34,8 @@ import_format: ['{{%name}}'] skip_sweeper: true examples: - !ruby/object:Provider::Terraform::Examples - name: - 'cloud_identity_group_membership' - # Has a handwritten test due to CloudIdentityGroup-related tests needing to run synchronously + name: 'cloud_identity_group_membership' + # Has a handwritten test due to CloudIdentityGroup-related tests needing to run synchronously skip_test: true primary_resource_id: 'cloud_identity_group_membership_basic' vars: @@ -45,9 +44,8 @@ examples: org_domain: :ORG_DOMAIN cust_id: :CUST_ID - !ruby/object:Provider::Terraform::Examples - name: - 'cloud_identity_group_membership_user' - # Has a handwritten test due to CloudIdentityGroup-related tests needing to run synchronously + name: 'cloud_identity_group_membership_user' + # Has a handwritten test due to CloudIdentityGroup-related tests needing to run synchronously skip_test: true primary_resource_id: 'cloud_identity_group_membership_basic' vars: diff --git a/mmv1/products/compute/Address.yaml b/mmv1/products/compute/Address.yaml index 334a8b209f07..edae477a594f 100644 --- a/mmv1/products/compute/Address.yaml +++ b/mmv1/products/compute/Address.yaml @@ -78,8 +78,7 @@ examples: primary_resource_id: 'internal_with_shared_loadbalancer_vip' vars: address_name: 'my-internal-address' - skip_docs: - true # It is almost identical to internal_with_gce_endpoint + skip_docs: true # It is almost identical to internal_with_gce_endpoint # TODO(rileykarson): Remove this example when instance is supported - !ruby/object:Provider::Terraform::Examples name: 'instance_with_ip' diff --git a/mmv1/products/compute/Instance.yaml b/mmv1/products/compute/Instance.yaml index e37cd0ff436c..85ec840c98e8 100644 --- a/mmv1/products/compute/Instance.yaml +++ b/mmv1/products/compute/Instance.yaml @@ -646,7 +646,6 @@ properties: # This is incorrect because you can make actions on the Instance (start, stop) # In an idempotent world, the best way to express these actions is to # change the status value. - output: false values: - :PROVISIONING - :STAGING diff --git a/mmv1/products/compute/ResizeRequest.yaml b/mmv1/products/compute/ResizeRequest.yaml index bdc6bbbe6349..ee8c05a35efa 100644 --- a/mmv1/products/compute/ResizeRequest.yaml +++ b/mmv1/products/compute/ResizeRequest.yaml @@ -38,10 +38,6 @@ base_url: "projects/{{project}}/zones/{{zone}}/instanceGroupManagers/{{instance_ ### Get Method self_link: "projects/{{project}}/zones/{{zone}}/instanceGroupManagers/{{instance_group_manager}}/resizeRequests/{{name}}" -### Create Method ### -# Get method with a post -create_verb: :POST - ### Update method ### # Resize requests are currently not update-able @@ -74,7 +70,13 @@ async: !ruby/object:Api::OpAsync error: !ruby/object:Api::OpAsync::Error path: "error/errors" message: "message" - +# Examples for testing +examples: + - !ruby/object:Provider::Terraform::Examples + name: "compute_mig_resize_request" + primary_resource_id: "a3_resize_request" + vars: + resize_request_name: a3-dws # Resize request parameters injected via URL parameters: - !ruby/object:Api::Type::ResourceRef @@ -414,11 +416,3 @@ properties: output: true description: | The localized error message in the above locale. - -#Examples for testing -examples: - - !ruby/object:Provider::Terraform::Examples - name: "compute_mig_resize_request" - primary_resource_id: "a3_resize_request" - vars: - resize_request_name: a3-dws diff --git a/mmv1/products/compute/product.yaml b/mmv1/products/compute/product.yaml index 1cd722004bf4..166631d1180f 100644 --- a/mmv1/products/compute/product.yaml +++ b/mmv1/products/compute/product.yaml @@ -11,9 +11,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -# TODO(nelsonjr): Make all Zone and Region resource ref - --- !ruby/object:Api::Product +# TODO(nelsonjr): Make all Zone and Region resource ref name: Compute display_name: Compute Engine versions: diff --git a/mmv1/products/containeranalysis/Occurrence.yaml b/mmv1/products/containeranalysis/Occurrence.yaml index 9105eb821390..4a3b23cb3c99 100644 --- a/mmv1/products/containeranalysis/Occurrence.yaml +++ b/mmv1/products/containeranalysis/Occurrence.yaml @@ -29,9 +29,8 @@ id_format: 'projects/{{project}}/occurrences/{{name}}' import_format: ['projects/{{project}}/occurrences/{{name}}'] examples: - !ruby/object:Provider::Terraform::Examples - name: - 'container_analysis_occurrence_kms' - # Occurrence requires custom logic for signing payloads. + name: 'container_analysis_occurrence_kms' + # Occurrence requires custom logic for signing payloads. skip_test: true primary_resource_id: 'occurrence' vars: diff --git a/mmv1/products/datacatalog/Tag.yaml b/mmv1/products/datacatalog/Tag.yaml index be768f3dead4..624ae45bac65 100644 --- a/mmv1/products/datacatalog/Tag.yaml +++ b/mmv1/products/datacatalog/Tag.yaml @@ -60,9 +60,8 @@ examples: oics_vars_overrides: force_delete: 'true' - !ruby/object:Provider::Terraform::Examples - name: - 'data_catalog_entry_tag_full' - # Multiple fine-grained resources + name: 'data_catalog_entry_tag_full' + # Multiple fine-grained resources skip_vcr: true primary_resource_id: 'basic_tag' vars: diff --git a/mmv1/products/datacatalog/Taxonomy.yaml b/mmv1/products/datacatalog/Taxonomy.yaml index c6039aacd3da..01ffcc7ec58a 100644 --- a/mmv1/products/datacatalog/Taxonomy.yaml +++ b/mmv1/products/datacatalog/Taxonomy.yaml @@ -84,8 +84,7 @@ properties: description: | A list of policy types that are activated for this taxonomy. If not set, defaults to an empty list. - item_type: - !ruby/object:Api::Type::Enum # TOOD: should this be enum or string + item_type: !ruby/object:Api::Type::Enum # TOOD: should this be enum or string name: 'policyType' description: 'Defines policy types where policy tag can be used for' values: diff --git a/mmv1/products/deploymentmanager/Deployment.yaml b/mmv1/products/deploymentmanager/Deployment.yaml index dff0560306c5..9d0839b9cbc1 100644 --- a/mmv1/products/deploymentmanager/Deployment.yaml +++ b/mmv1/products/deploymentmanager/Deployment.yaml @@ -45,8 +45,7 @@ async: !ruby/object:Api::OpAsync message: 'message' id_format: 'projects/{{project}}/deployments/{{name}}' import_format: ['projects/{{project}}/deployments/{{name}}'] -timeouts: - !ruby/object:Api::Timeouts # Very long to support very long deployments +timeouts: !ruby/object:Api::Timeouts # Very long to support very long deployments insert_minutes: 60 update_minutes: 60 delete_minutes: 60 @@ -83,8 +82,8 @@ examples: vars: deployment_name: 'my-deployment' skip_test: true -custom_code: - !ruby/object:Provider::Terraform::CustomCode # post-create failure: Delete deployment if an invalid deployment was created +custom_code: !ruby/object:Provider::Terraform::CustomCode + # post-create failure: Delete deployment if an invalid deployment was created post_create_failure: 'templates/terraform/post_create_failure/delete_on_failure.go.erb' # Custom diff to force new if 'preview' is true constants: 'templates/terraform/constants/deployment_manager_deployment.go.erb' @@ -122,6 +121,7 @@ parameters: - :ABANDON - :DELETE - !ruby/object:Api::Type::Boolean + # Custom Update name: 'preview' description: | If set to true, a deployment is created with "shell" resources @@ -134,7 +134,6 @@ parameters: to true or if other fields are updated while preview is true. default_value: false url_param_only: true - # Custom Update update_id: '0_preview' fingerprint_name: 'fingerprint' update_verb: :PATCH @@ -146,20 +145,20 @@ properties: Unique name for the deployment required: true - !ruby/object:Api::Type::String + # Custom Update name: 'description' description: | Optional user-provided description of deployment. - # Custom Update fingerprint_name: 'fingerprint' update_id: '1_non-preview' update_verb: :PATCH update_url: projects/{{project}}/global/deployments/{{name}}?preview={{preview}}&createPolicy={{create_policy}}&deletePolicy={{delete_policy}} - !ruby/object:Api::Type::Array + # Custom Update name: 'labels' description: | Key-value pairs to apply to this labels. send_empty_value: true - # Custom Update fingerprint_name: 'fingerprint' update_id: '1_non-preview' update_verb: :PATCH @@ -176,12 +175,12 @@ properties: description: | Value of label. - !ruby/object:Api::Type::NestedObject + # Custom Update name: 'target' required: true description: | Parameters that define your deployment, including the deployment configuration and relevant templates. - # Custom Update fingerprint_name: 'fingerprint' update_id: '1_non-preview' update_verb: :PATCH diff --git a/mmv1/products/dlp/DeidentifyTemplate.yaml b/mmv1/products/dlp/DeidentifyTemplate.yaml index 04635fd14c06..d893498e57c1 100644 --- a/mmv1/products/dlp/DeidentifyTemplate.yaml +++ b/mmv1/products/dlp/DeidentifyTemplate.yaml @@ -1040,7 +1040,8 @@ properties: name: redactConfig description: | Redact a given value. For example, if used with an InfoTypeTransformation transforming PHONE_NUMBER, and input 'My phone number is 206-555-0123', the output would be 'My phone number is '. - properties: [] # Meant to be an empty object with no properties - see here : https://cloud.google.com/dlp/docs/reference/rest/v2/projects.deidentifyTemplates#redactconfig + properties: + [] # Meant to be an empty object with no properties - see here : https://cloud.google.com/dlp/docs/reference/rest/v2/projects.deidentifyTemplates#redactconfig # The fields below are necessary to include the "redactConfig" transformation in the payload # A side-effect is null values when the field is unused, see: https://github.com/hashicorp/terraform-provider-google/issues/13201 send_empty_value: true @@ -1221,8 +1222,7 @@ properties: Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time. validation: !ruby/object:Provider::Terraform::Validation - function: - 'validation.IntBetween(0, 24)' # "An API may choose to allow the value "24:00:00" for scenarios like business closing time." + function: 'validation.IntBetween(0, 24)' # "An API may choose to allow the value "24:00:00" for scenarios like business closing time." - !ruby/object:Api::Type::Integer name: minutes description: @@ -1241,8 +1241,7 @@ properties: allows leap-seconds. validation: !ruby/object:Provider::Terraform::Validation - function: - 'validation.IntBetween(0, 60)' # "An API may allow the value 60 if it allows leap-seconds." + function: 'validation.IntBetween(0, 60)' # "An API may allow the value 60 if it allows leap-seconds." - !ruby/object:Api::Type::Integer name: nanos description: @@ -1424,7 +1423,8 @@ properties: name: redactConfig description: | Redact a given value. For example, if used with an InfoTypeTransformation transforming PHONE_NUMBER, and input 'My phone number is 206-555-0123', the output would be 'My phone number is '. - properties: [] # Meant to be an empty object with no properties - see here : https://cloud.google.com/dlp/docs/reference/rest/v2/projects.deidentifyTemplates#redactconfig + properties: + [] # Meant to be an empty object with no properties - see here : https://cloud.google.com/dlp/docs/reference/rest/v2/projects.deidentifyTemplates#redactconfig # The fields below are necessary to include the "redactConfig" transformation in the payload # A side-effect is null values when the field is unused, see: https://github.com/hashicorp/terraform-provider-google/issues/13201 send_empty_value: true @@ -2423,8 +2423,7 @@ properties: Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time. validation: !ruby/object:Provider::Terraform::Validation - function: - 'validation.IntBetween(0, 24)' # "An API may choose to allow the value "24:00:00" for scenarios like business closing time." + function: 'validation.IntBetween(0, 24)' # "An API may choose to allow the value "24:00:00" for scenarios like business closing time." - !ruby/object:Api::Type::Integer name: minutes description: | @@ -2439,8 +2438,7 @@ properties: Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds. validation: !ruby/object:Provider::Terraform::Validation - function: - 'validation.IntBetween(0, 60)' # "An API may allow the value 60 if it allows leap-seconds." + function: 'validation.IntBetween(0, 60)' # "An API may allow the value 60 if it allows leap-seconds." - !ruby/object:Api::Type::Integer name: nanos description: | @@ -2496,7 +2494,8 @@ properties: name: redactConfig description: | Redact a given value. For example, if used with an InfoTypeTransformation transforming PHONE_NUMBER, and input 'My phone number is 206-555-0123', the output would be 'My phone number is '. - properties: [] # Meant to be an empty object with no properties - see here : https://cloud.google.com/dlp/docs/reference/rest/v2/projects.deidentifyTemplates#redactconfig + properties: + [] # Meant to be an empty object with no properties - see here : https://cloud.google.com/dlp/docs/reference/rest/v2/projects.deidentifyTemplates#redactconfig # The fields below are necessary to include the "redactConfig" transformation in the payload # A side-effect is null values when the field is unused, see: https://github.com/hashicorp/terraform-provider-google/issues/13201 send_empty_value: true @@ -3022,7 +3021,8 @@ properties: name: replaceWithInfoTypeConfig description: | Replace each matching finding with the name of the info type. - properties: [] # Meant to be an empty object with no properties - see here : https://cloud.google.com/dlp/docs/reference/rest/v2/projects.deidentifyTemplates#DeidentifyTemplate.ReplaceWithInfoTypeConfig + properties: + [] # Meant to be an empty object with no properties - see here : https://cloud.google.com/dlp/docs/reference/rest/v2/projects.deidentifyTemplates#DeidentifyTemplate.ReplaceWithInfoTypeConfig # The fields below are necessary to include the "replaceWithInfoTypeConfig" transformation in the payload # A side-effect is null values when the field is unused, see: https://github.com/hashicorp/terraform-provider-google/issues/13201 send_empty_value: true diff --git a/mmv1/products/dlp/JobTrigger.yaml b/mmv1/products/dlp/JobTrigger.yaml index a40ceaebdeca..b69520ef63a4 100644 --- a/mmv1/products/dlp/JobTrigger.yaml +++ b/mmv1/products/dlp/JobTrigger.yaml @@ -719,7 +719,8 @@ properties: name: 'surrogateType' description: | Message for detecting output from deidentification transformations that support reversing. - properties: [] # Meant to be an empty object with no properties - see here : https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#SurrogateType + properties: + [] # Meant to be an empty object with no properties - see here : https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#SurrogateType # The fields below are necessary to include the "surrogateType" in the payload send_empty_value: true allow_empty_object: true diff --git a/mmv1/products/documentaiwarehouse/DocumentSchema.yaml b/mmv1/products/documentaiwarehouse/DocumentSchema.yaml index fd4ab554d83d..817e548241a9 100644 --- a/mmv1/products/documentaiwarehouse/DocumentSchema.yaml +++ b/mmv1/products/documentaiwarehouse/DocumentSchema.yaml @@ -27,9 +27,9 @@ custom_code: !ruby/object:Provider::Terraform::CustomCode custom_import: templates/terraform/custom_import/document_ai_warehouse_document_schema.go.erb examples: - !ruby/object:Provider::Terraform::Examples + name: "document_ai_warehouse_document_schema_text" # docs only, testing is done in an update test skip_test: true - name: "document_ai_warehouse_document_schema_text" primary_resource_id: "example_text" parameters: - !ruby/object:Api::Type::String diff --git a/mmv1/products/documentaiwarehouse/Location.yaml b/mmv1/products/documentaiwarehouse/Location.yaml index dccdbac1b858..dbf740cc442a 100644 --- a/mmv1/products/documentaiwarehouse/Location.yaml +++ b/mmv1/products/documentaiwarehouse/Location.yaml @@ -48,9 +48,9 @@ skip_sweeper: true exclude_import: true examples: - !ruby/object:Provider::Terraform::Examples + name: "document_ai_warehouse_location" # docs only, testing is done in a DocumentSchema update test skip_test: true - name: "document_ai_warehouse_location" primary_resource_id: "example" timeouts: !ruby/object:Api::Timeouts insert_minutes: 30 diff --git a/mmv1/products/firebase/WebApp.yaml b/mmv1/products/firebase/WebApp.yaml index a4cc52c0cb40..98505e9c2dc2 100644 --- a/mmv1/products/firebase/WebApp.yaml +++ b/mmv1/products/firebase/WebApp.yaml @@ -59,8 +59,8 @@ identity: - name examples: - !ruby/object:Provider::Terraform::Examples # TODO: https://github.com/hashicorp/terraform-provider-google/issues/14158 - skip_vcr: true name: 'firebase_web_app_basic' + skip_vcr: true min_version: 'beta' primary_resource_id: 'basic' vars: diff --git a/mmv1/products/firestore/Index.yaml b/mmv1/products/firestore/Index.yaml index 6d85d2dd844d..6f05fe10082c 100644 --- a/mmv1/products/firestore/Index.yaml +++ b/mmv1/products/firestore/Index.yaml @@ -132,8 +132,6 @@ properties: composite index is not directional, the `__name__` will be ordered `"ASCENDING"` (unless explicitly specified otherwise). required: true - # Single field indexes _exist_, but the API only lets us manage composite ones. - min_size: 2 diff_suppress_func: firestoreIFieldsDiffSuppress item_type: !ruby/object:Api::Type::NestedObject properties: @@ -176,4 +174,7 @@ properties: Indicates the vector index is a flat index. allow_empty_object: true send_empty_value: true - properties: [] # Meant to be an empty object with no properties. + properties: + [] # Meant to be an empty object with no properties. + # Single field indexes _exist_, but the API only lets us manage composite ones. + min_size: 2 diff --git a/mmv1/products/monitoring/AlertPolicy.yaml b/mmv1/products/monitoring/AlertPolicy.yaml index ca0bf80921e5..c627852549bf 100644 --- a/mmv1/products/monitoring/AlertPolicy.yaml +++ b/mmv1/products/monitoring/AlertPolicy.yaml @@ -33,29 +33,29 @@ error_abort_predicates: ['transport_tpg.Is429QuotaError'] examples: # skipping tests because the API is full of race conditions - !ruby/object:Provider::Terraform::Examples - skip_test: true name: 'monitoring_alert_policy_basic' + skip_test: true primary_resource_id: 'alert_policy' vars: alert_policy_display_name: 'My Alert Policy' # skipping tests because the API is full of race conditions - !ruby/object:Provider::Terraform::Examples - skip_test: true name: 'monitoring_alert_policy_evaluation_missing_data' + skip_test: true primary_resource_id: 'alert_policy' vars: alert_policy_display_name: 'My Alert Policy' # skipping tests because the API is full of race conditions - !ruby/object:Provider::Terraform::Examples - skip_test: true name: 'monitoring_alert_policy_forecast_options' + skip_test: true primary_resource_id: 'alert_policy' vars: alert_policy_display_name: 'My Alert Policy' # skipping tests because the API is full of race conditions - !ruby/object:Provider::Terraform::Examples - skip_test: true name: 'monitoring_alert_policy_promql_condition' + skip_test: true primary_resource_id: 'alert_policy' vars: alert_policy_display_name: 'My Alert Policy' diff --git a/mmv1/products/netapp/kmsconfig.yaml b/mmv1/products/netapp/kmsconfig.yaml index d33ae5bee32e..a68c7b1190bd 100644 --- a/mmv1/products/netapp/kmsconfig.yaml +++ b/mmv1/products/netapp/kmsconfig.yaml @@ -11,8 +11,8 @@ # See the License for the specific language governing permissions and # limitations under the License. ---- -!ruby/object:Api::Resource # API resource name +--- !ruby/object:Api::Resource +# API resource name name: "kmsconfig" description: | NetApp Volumes always encrypts your data at rest using volume-specific keys. @@ -55,7 +55,8 @@ parameters: url_param_only: true description: | Name of the policy location. CMEK policies apply to the whole region. - - !ruby/object:Api::Type::String # OK: This needs to be 'name' IMHO + - !ruby/object:Api::Type::String + # OK: This needs to be 'name' IMHO name: "name" description: | Name of the CMEK policy. diff --git a/mmv1/products/networksecurity/AddressGroup.yaml b/mmv1/products/networksecurity/AddressGroup.yaml index 20e7bd5f3f0b..00cd6b1fc1b1 100644 --- a/mmv1/products/networksecurity/AddressGroup.yaml +++ b/mmv1/products/networksecurity/AddressGroup.yaml @@ -21,8 +21,7 @@ update_verb: :PATCH update_mask: true description: | AddressGroup is a resource that specifies how a collection of IP/DNS used in Firewall Policy. -references: - !ruby/object:Api::Resource::ReferenceLinks # TODO(diogoesteves): change the url to GA once it is available. +references: !ruby/object:Api::Resource::ReferenceLinks # TODO(diogoesteves): change the url to GA once it is available. guides: "Use AddressGroups": "https://cloud.google.com/vpc/docs/use-address-groups-firewall-policies" api: "https://cloud.google.com/traffic-director/docs/reference/network-security/rest/v1beta1/organizations.locations.addressGroups" diff --git a/mmv1/products/notebooks/README.md b/mmv1/products/notebooks/README.md deleted file mode 100644 index 18230526951e..000000000000 --- a/mmv1/products/notebooks/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# Overriding value troubleshooting - -1. Validate error - - ``` - NoMethodError: undefined method `validate' - ``` - - Solution: Don't forget `!ruby/object:Overrides::Terraform::PropertyOverride` - -1. Not sending a value. - - ``` - ~ guest_attributes = {} -> (known after apply) - - internal_ip_only = false -> null - ~ labels = {} -> (known after apply) - ``` - - Solution: Use `send_empty_value` - -1. diff --git a/mmv1/products/privateca/CertificateAuthority.yaml b/mmv1/products/privateca/CertificateAuthority.yaml index 6a140fe0a019..58dc39b436e3 100644 --- a/mmv1/products/privateca/CertificateAuthority.yaml +++ b/mmv1/products/privateca/CertificateAuthority.yaml @@ -69,8 +69,7 @@ examples: ignore_read_extra: - 'deletion_protection' - !ruby/object:Provider::Terraform::Examples - name: - 'privateca_certificate_authority_subordinate' + name: 'privateca_certificate_authority_subordinate' # This example ultimately generates a random id making replaying impossible at # https://github.com/hashicorp/terraform-provider-google-beta/blob/22bfbbcf2250054e622743c4a35a872e43ed5aed/google-beta/privateca_ca_utils.go#L147 skip_vcr: true @@ -88,10 +87,10 @@ examples: - 'deletion_protection' - 'subordinate_config.0.certificate_authority' - !ruby/object:Provider::Terraform::Examples + name: 'privateca_certificate_authority_byo_key' # Skip test because it depends on a beta resource, but PrivateCA does # not have a beta endpoint skip_test: true - name: 'privateca_certificate_authority_byo_key' primary_resource_id: 'default' # Multiple IAM bindings on the same key cause non-determinism diff --git a/mmv1/products/securitycenter/Source.yaml b/mmv1/products/securitycenter/Source.yaml index d0ea00ccf7ff..820f43dd2bb4 100644 --- a/mmv1/products/securitycenter/Source.yaml +++ b/mmv1/products/securitycenter/Source.yaml @@ -36,8 +36,7 @@ iam_policy: !ruby/object:Api::Resource::IamPolicy skip_delete: true examples: - !ruby/object:Provider::Terraform::Examples - name: - 'scc_source_basic' + name: 'scc_source_basic' # resource can't be destroyed, so checkdestroy fails unnecessarily skip_test: true primary_resource_id: 'custom_source' diff --git a/mmv1/products/securitycenterv2/OrganizationSource.yaml b/mmv1/products/securitycenterv2/OrganizationSource.yaml index 18640c3c0db2..5841243f7281 100644 --- a/mmv1/products/securitycenterv2/OrganizationSource.yaml +++ b/mmv1/products/securitycenterv2/OrganizationSource.yaml @@ -36,8 +36,7 @@ iam_policy: !ruby/object:Api::Resource::IamPolicy skip_delete: true examples: - !ruby/object:Provider::Terraform::Examples - name: - 'scc_source_basic' + name: 'scc_source_basic' # resource can't be destroyed, so checkdestroy fails unnecessarily skip_test: true primary_resource_id: 'custom_source' diff --git a/mmv1/products/sql/product.yaml b/mmv1/products/sql/product.yaml index 5658ae7e1975..09d7727287c3 100644 --- a/mmv1/products/sql/product.yaml +++ b/mmv1/products/sql/product.yaml @@ -12,6 +12,17 @@ # limitations under the License. --- !ruby/object:Api::Product +# 'BackupRun' is not idempotent and will not be covered. +# | - !ruby/object:Api::Resource +# | name: 'BackupRun' +# | kind: 'sql#backupRun' +# | base_url: projects/{{project}}/instances/{{instance}}/backupRuns +# 'Operation' is not idempotent and will not be covered. +# (it is used internally to assert the state of operations being performed) +# | - !ruby/object:Api::Resource +# | name: 'Operation' +# | kind: 'sql#operation' +# | base_url: projects/{{project}}/operations name: SQL display_name: Cloud SQL client_name: 'SqlAdmin' @@ -39,14 +50,3 @@ async: !ruby/object:Api::OpAsync error: !ruby/object:Api::OpAsync::Error path: 'error/errors' message: 'message' -# 'BackupRun' is not idempotent and will not be covered. -# | - !ruby/object:Api::Resource -# | name: 'BackupRun' -# | kind: 'sql#backupRun' -# | base_url: projects/{{project}}/instances/{{instance}}/backupRuns -# 'Operation' is not idempotent and will not be covered. -# (it is used internally to assert the state of operations being performed) -# | - !ruby/object:Api::Resource -# | name: 'Operation' -# | kind: 'sql#operation' -# | base_url: projects/{{project}}/operations diff --git a/mmv1/products/storage/HmacKey.yaml b/mmv1/products/storage/HmacKey.yaml index 589b8a8ab11b..579d707dbceb 100644 --- a/mmv1/products/storage/HmacKey.yaml +++ b/mmv1/products/storage/HmacKey.yaml @@ -61,9 +61,9 @@ properties: The state of the key. Can be set to one of ACTIVE, INACTIVE. default_value: :ACTIVE values: + # - :DELETED (not directly settable) - :ACTIVE - :INACTIVE - # - :DELETED (not directly settable) update_verb: :PUT update_url: projects/{{project}}/hmacKeys/{{access_id}} update_id: 'state' diff --git a/mmv1/products/vertexai/Endpoint.yaml b/mmv1/products/vertexai/Endpoint.yaml index b41738fd8e25..bb16a5a72105 100644 --- a/mmv1/products/vertexai/Endpoint.yaml +++ b/mmv1/products/vertexai/Endpoint.yaml @@ -54,8 +54,7 @@ description: predictions and explanations.' examples: - !ruby/object:Provider::Terraform::Examples - name: - 'vertex_ai_endpoint_network' + name: 'vertex_ai_endpoint_network' # Test is covered by handwritten test to include an update. skip_test: true primary_resource_id: 'endpoint'