Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* Resolve yaml lint errors

* Resolve yaml lint warnings
  • Loading branch information
trodge authored and ericayyliu committed Jul 26, 2023
1 parent e34d4ea commit a28357e
Show file tree
Hide file tree
Showing 66 changed files with 206 additions and 207 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ async: !ruby/object:Provider::Terraform::PollAsync
actions: ['create']
autogen_async: true
exclude_validator: true
exclude_import: true # no unique way to specify
exclude_import: true # no unique way to specify
# Skipping the sweeper due to the non-standard base_url and because this is fine-grained under AccessLevel
skip_sweeper: true
id_format: '{{access_level}}'
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/accesscontextmanager/ServicePerimeters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

--- !ruby/object:Api::Resource # This is the plural of `ServicePerimeter`, any changes here should be made to `ServicePerimeter` as well
--- !ruby/object:Api::Resource # This is the plural of `ServicePerimeter`, any changes here should be made to `ServicePerimeter` as well
name: 'ServicePerimeters'
base_url: '{{parent}}/servicePerimeters:replaceAll'
update_url: '{{parent}}/servicePerimeters:replaceAll'
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/activedirectory/Domain.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ name: 'Domain'
kind: 'activedirectory#domain'
base_url: projects/{{project}}/locations/global/domains
create_url: projects/{{project}}/locations/global/domains?domainName={{domain_name}}
delete_url: projects/{{project}}/locations/global/domains/{{domain_name}} # equivalent to {{name}}, but makes sweepers work
delete_url: projects/{{project}}/locations/global/domains/{{domain_name}} # equivalent to {{name}}, but makes sweepers work
update_verb: :PATCH
update_mask: true
self_link: '{{name}}'
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/apigateway/ApiConfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ examples:
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
context["random_suffix"])' # Need to pass 2 ids into a Sprintf - parent resource id also needed to identify primary resource
vars:
api_id: 'my-api'
config_id: 'my-config'
Expand Down
6 changes: 3 additions & 3 deletions mmv1/products/apigateway/product.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ async: !ruby/object:Api::OpAsync
resource_inside_response: true
status: !ruby/object:Api::OpAsync::Status
path: 'done'
complete: True
complete: true
allowed:
- True
- False
- true
- false
error: !ruby/object:Api::OpAsync::Error
path: 'error'
message: 'message'
2 changes: 1 addition & 1 deletion mmv1/products/apigee/KeystoresAliasesSelfSignedCert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ examples:
test_env_vars:
org_id: :ORG_ID
billing_account: :BILLING_ACCT
# Resource creation race
# Resource creation race
timeouts: !ruby/object:Api::Timeouts
insert_minutes: 30
delete_minutes: 30
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/beyondcorp/product.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
!ruby/object:Api::Product
# Copyright 2022 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -11,6 +10,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
--- !ruby/object:Api::Product
name: Beyondcorp
display_name: BeyondCorp
versions:
Expand Down
8 changes: 4 additions & 4 deletions mmv1/products/bigquery/DatasetAccess.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,29 +53,29 @@ mutex: '{{dataset_id}}'
examples:
- !ruby/object:Provider::Terraform::Examples
name: 'bigquery_dataset_access_basic_user'
skip_test: true # not importable
skip_test: true # not importable
primary_resource_id: 'access'
vars:
dataset_id: 'example_dataset'
account_name: 'bqowner'
- !ruby/object:Provider::Terraform::Examples
name: 'bigquery_dataset_access_view'
skip_test: true # not importable
skip_test: true # not importable
primary_resource_id: 'access'
vars:
dataset_id: 'example_dataset'
dataset_id2: 'example_dataset2'
table_id: 'example_table'
- !ruby/object:Provider::Terraform::Examples
name: 'bigquery_dataset_access_authorized_dataset'
skip_test: true # not importable
skip_test: true # not importable
primary_resource_id: 'access'
vars:
private: 'private'
public: 'public'
- !ruby/object:Provider::Terraform::Examples
name: 'bigquery_dataset_access_authorized_routine'
skip_test: true # not importable
skip_test: true # not importable
primary_resource_type: 'google_bigquery_dataset_access'
primary_resource_id: 'authorized_routine'
vars:
Expand Down
12 changes: 6 additions & 6 deletions mmv1/products/bigquery/Job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ examples:
primary_resource_id: 'job'
vars:
job_id: 'job_load'
bucket_name: 'bq-geojson' # Keep small(er) to avoid downstream acctest having too-long a bucket name
bucket_name: 'bq-geojson' # Keep small(er) to avoid downstream acctest having too-long a bucket name
test_env_vars:
project: :PROJECT_NAME
ignore_read_extra:
Expand All @@ -85,7 +85,7 @@ examples:
- 'etag'
- 'load.0.destination_table.0.table_id'
- 'status.0.state'
skip_docs: true # there are a lot of examples for this resource, so omitting some that are similar to others
skip_docs: true # there are a lot of examples for this resource, so omitting some that are similar to others
- !ruby/object:Provider::Terraform::Examples
name: 'bigquery_job_copy'
primary_resource_id: 'job'
Expand Down Expand Up @@ -115,7 +115,7 @@ examples:
- 'copy.0.source_tables.0.table_id'
- 'copy.0.source_tables.1.table_id'
- 'status.0.state'
skip_docs: true # there are a lot of examples for this resource, so omitting some that are similar to others
skip_docs: true # there are a lot of examples for this resource, so omitting some that are similar to others
- !ruby/object:Provider::Terraform::Examples
name: 'bigquery_job_extract'
primary_resource_id: 'job'
Expand All @@ -135,7 +135,7 @@ examples:
- 'etag'
- 'extract.0.source_table.0.table_id'
- 'status.0.state'
skip_docs: true # there are a lot of examples for this resource, so omitting some that are similar to others
skip_docs: true # there are a lot of examples for this resource, so omitting some that are similar to others
custom_code: !ruby/object:Provider::Terraform::CustomCode
constants: templates/terraform/constants/bigquery_job.go
encoder: templates/terraform/encoders/bigquery_job.go.erb
Expand Down Expand Up @@ -221,16 +221,16 @@ properties:
properties:
- !ruby/object:Api::Type::String
name: 'resourceUri'
# TODO (mbang): exactly_one_of: resourceUri, inlineCode
description:
'A code resource to load from a Google Cloud Storage URI
(gs://bucket/path).'
# TODO (mbang): exactly_one_of: resourceUri, inlineCode
- !ruby/object:Api::Type::String
name: 'inlineCode'
# TODO (mbang): exactly_one_of: resourceUri, inlineCode
description: |
An inline resource that contains code for a user-defined function (UDF).
Providing a inline code resource is equivalent to providing a URI for a file containing the same code.
# TODO (mbang): exactly_one_of: resourceUri, inlineCode
- !ruby/object:Api::Type::Enum
name: 'createDisposition'
description: |
Expand Down
6 changes: 3 additions & 3 deletions mmv1/products/bigquery/Routine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ properties:
- :IN
- :OUT
- :INOUT
# This is a string instead of a NestedObject because schemas contain ColumnSchemas,
# which can contain nested StandardSqlDataType.
# We'll have people provide the json blob for the schema instead.
# This is a string instead of a NestedObject because schemas contain ColumnSchemas,
# which can contain nested StandardSqlDataType.
# We'll have people provide the json blob for the schema instead.
- !ruby/object:Api::Type::String
name: 'dataType'
description: |
Expand Down
4 changes: 2 additions & 2 deletions mmv1/products/bigqueryconnection/Connection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ examples:
oics_vars_overrides:
deletion_protection: 'false'
ignore_read_extra:
- 'cloud_sql.0.credential' # password removed
- 'cloud_sql.0.credential' # password removed
- !ruby/object:Provider::Terraform::Examples
name: 'bigquery_connection_full'
pull_external: true
Expand All @@ -89,7 +89,7 @@ examples:
oics_vars_overrides:
deletion_protection: 'false'
ignore_read_extra:
- 'cloud_sql.0.credential' # password removed
- 'cloud_sql.0.credential' # password removed
- !ruby/object:Provider::Terraform::Examples
name: 'bigquery_connection_aws'
pull_external: true
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/cloudbuild/Trigger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ docs: !ruby/object:Provider::Terraform::Docs
import_format:
- 'projects/{{project}}/triggers/{{trigger_id}}'
- 'projects/{{project}}/locations/{{location}}/triggers/{{trigger_id}}'
# For global triggers, the id format is changed to projects/{{project}}/triggers/{{trigger_id}} via code overrides.
# For global triggers, the id format is changed to projects/{{project}}/triggers/{{trigger_id}} via code overrides.
id_format: 'projects/{{project}}/locations/{{location}}/triggers/{{trigger_id}}'
schema_version: 2
examples:
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/cloudids/Endpoint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ examples:
name: 'cloudids_endpoint'
primary_resource_id:
'example-endpoint'
#Skip_test set to true since the example is identical to what's in the _test.go file.
# skip_test set to true since the example is identical to what's in the _test.go file.
skip_test: true
parameters:
- !ruby/object:Api::Type::String
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/compute/Address.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ examples:
vars:
address_name: 'my-internal-address'
skip_docs:
true # It is almost identical to internal_with_gce_endpoint
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'
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/compute/BackendService.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1244,7 +1244,7 @@ properties:
properties:
- !ruby/object:Api::Type::ResourceRef
name: 'clientTlsPolicy'
resource: 'Region' # TODO: 'Region' is incorrect and should be 'ClientTlsPolicy'
resource: 'Region' # TODO: 'Region' is incorrect and should be 'ClientTlsPolicy'
imports: 'name'
description: |
ClientTlsPolicy is a resource that specifies how a client should authenticate
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/compute/Image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -368,4 +368,4 @@ properties:
- :READY
- :PENDING
- :FAILED
# State is not applicable for state convergence.
# State is not applicable for state convergence.
2 changes: 1 addition & 1 deletion mmv1/products/compute/Network.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ properties:
required: true
validation: !ruby/object:Provider::Terraform::Validation
function: 'verify.ValidateGCEName'
# TODO: Change subnetworks to ResourceRef
- !ruby/object:Api::Type::Array
# TODO: Change subnetworks to ResourceRef
name: 'subnetworks'
description: |
Server-defined fully-qualified URLs for all subnetworks in this
Expand Down
32 changes: 16 additions & 16 deletions mmv1/products/compute/RegionTargetHttpsProxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,22 +92,22 @@ properties:
# This field is present in the schema but as of 2019 Sep 23 attempting to set it fails with
# a 400 "QUIC override is supported only with global TargetHttpsProxy". jamessynge@ said in an
# email sent on 2019 Sep 20 that support for this "is probably far in the future."
#- !ruby/object:Api::Type::Enum
# name: 'quicOverride'
# description: |
# Specifies the QUIC override policy for this resource. This determines
# whether the load balancer will attempt to negotiate QUIC with clients
# or not. Can specify one of NONE, ENABLE, or DISABLE. If NONE is
# specified, uses the QUIC policy with no user overrides, which is
# equivalent to DISABLE. Not specifying this field is equivalent to
# specifying NONE.
# values:
# - :NONE
# - :ENABLE
# - :DISABLE
# update_verb: :POST
# update_url:
# 'projects/{{project}}/regions/{{region}}/targetHttpsProxies/{{name}}/setQuicOverride'
# - !ruby/object:Api::Type::Enum
# name: 'quicOverride'
# description: |
# Specifies the QUIC override policy for this resource. This determines
# whether the load balancer will attempt to negotiate QUIC with clients
# or not. Can specify one of NONE, ENABLE, or DISABLE. If NONE is
# specified, uses the QUIC policy with no user overrides, which is
# equivalent to DISABLE. Not specifying this field is equivalent to
# specifying NONE.
# values:
# - :NONE
# - :ENABLE
# - :DISABLE
# update_verb: :POST
# update_url:
# 'projects/{{project}}/regions/{{region}}/targetHttpsProxies/{{name}}/setQuicOverride'
- !ruby/object:Api::Type::Array
name: 'sslCertificates'
description: |
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/compute/RegionUrlMap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ examples:
l7_xlb_proxy: 'l7-xlb-proxy'
l7_xlb_forwarding_rule: 'l7-xlb-forwarding-rule'
skip_docs: true
skip_test: true # Similar to other samples
skip_test: true # Similar to other samples
min_version: beta
parameters:
- !ruby/object:Api::Type::ResourceRef
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/compute/Router.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ properties:
blank to advertise no custom groups.
This enum field has the one valid value: ALL_SUBNETS
item_type: Api::Type::String # TODO(#324): enum?
item_type: Api::Type::String # TODO(#324): enum?
send_empty_value: true
- !ruby/object:Api::Type::Array
name: advertisedIpRanges
Expand Down
12 changes: 6 additions & 6 deletions mmv1/products/containerattached/Cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,6 @@ properties:
immutable: true
validation: !ruby/object:Provider::Terraform::Validation
regex: '^projects/[0-9]+$'
# If the user doesn't specify a loggingConfig, the server will supply a default value. Instead of
# letting that happen and allowing the config and state to get mismatched, just manually send an
# empty object if the user doesn't set anything and require the user to explicitly set the field if a
# value is desired.
# If the loggingConfig passed to the server is empty, an empty object is returned, so the diff in that
# case needs to be ignored.
- !ruby/object:Api::Type::String
name: state
description: |
Expand Down Expand Up @@ -240,6 +234,12 @@ properties:
name: loggingConfig
description: |
Logging configuration.
# If the user doesn't specify a loggingConfig, the server will supply a default value. Instead of
# letting that happen and allowing the config and state to get mismatched, just manually send an
# empty object if the user doesn't set anything and require the user to explicitly set the field if a
# value is desired.
# If the loggingConfig passed to the server is empty, an empty object is returned, so the diff in that
# case needs to be ignored.
send_empty_value: true
allow_empty_object: true
custom_expand: 'templates/terraform/custom_expand/containerattached_cluster_empty_logging.go.erb'
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/datacatalog/Tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ examples:
force_delete: 'true'
oics_vars_overrides:
force_delete: 'true'
skip_docs: true # omitting doc as it is almost identical to the case of data_catalog_entry_tag_basic
skip_docs: true # omitting doc as it is almost identical to the case of data_catalog_entry_tag_basic
custom_code: !ruby/object:Provider::Terraform::CustomCode
custom_import: templates/terraform/custom_import/data_catalog_tag.go.erb
encoder: templates/terraform/encoders/data_catalog_tag.go.erb
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/datacatalog/Taxonomy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ properties:
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
!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:
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/datafusion/Instance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ properties:
default_from_api: true
- !ruby/object:Api::Type::String
name: 'serviceAccount'
min_version: beta # This field is deprecated and needs to be absent in GA provider.
min_version: beta # This field is deprecated and needs to be absent in GA provider.
deprecation_message:
Use `tenant_project_id` instead to extract the tenant project ID.
output: true
Expand Down
4 changes: 2 additions & 2 deletions mmv1/products/deploymentmanager/Deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async: !ruby/object:Api::OpAsync
id_format: 'projects/{{project}}/deployments/{{name}}'
import_format: ['projects/{{project}}/deployments/{{name}}']
timeouts:
!ruby/object:Api::Timeouts # Very long to support very long deployments
!ruby/object:Api::Timeouts # Very long to support very long deployments
insert_minutes: 60
update_minutes: 60
delete_minutes: 60
Expand Down Expand Up @@ -84,7 +84,7 @@ examples:
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
!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'
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/dialogflow/Agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ examples:
primary_resource_id: 'full_agent'
vars:
agent_name: 'dialogflow-agent'
# Only one agent per project, API does not have an agent ID
# Only one agent per project, API does not have an agent ID
id_format: '{{project}}'
import_format: ['{{project}}']
skip_sweeper: true
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/dialogflow/EntityType.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ examples:
skip_test: true
vars:
intent_name: 'basic-entity-type'
# Skip sweeper gen since this is a child resource.
# Skip sweeper gen since this is a child resource.
skip_sweeper: true
id_format: '{{name}}'
import_format: ['{{name}}']
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/dialogflow/Fulfillment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ examples:
skip_test: true
vars:
fulfillment_name: 'basic-fulfillment'
# Skip sweeper gen since this is a child resource.
# Skip sweeper gen since this is a child resource.
skip_sweeper: true
id_format: '{{name}}'
import_format: ['{{name}}']
Expand Down
Loading

0 comments on commit a28357e

Please sign in to comment.