Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify Ruby yaml files to follow the rules to copy comments to Go yam… #11713

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mmv1/products/accesscontextmanager/ServicePerimeter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 2 additions & 3 deletions mmv1/products/activedirectory/Domain.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
7 changes: 3 additions & 4 deletions mmv1/products/apigateway/ApiConfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
9 changes: 4 additions & 5 deletions mmv1/products/appengine/StandardAppVersion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
2 changes: 1 addition & 1 deletion mmv1/products/artifactregistry/VPCSCConfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions mmv1/products/cloudidentity/Group.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 4 additions & 6 deletions mmv1/products/cloudidentity/GroupMembership.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
3 changes: 1 addition & 2 deletions mmv1/products/compute/Address.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 0 additions & 1 deletion mmv1/products/compute/Instance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 7 additions & 13 deletions mmv1/products/compute/ResizeRequest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
3 changes: 1 addition & 2 deletions mmv1/products/compute/product.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 2 additions & 3 deletions mmv1/products/containeranalysis/Occurrence.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 2 additions & 3 deletions mmv1/products/datacatalog/Tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 1 addition & 2 deletions mmv1/products/datacatalog/Taxonomy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
15 changes: 7 additions & 8 deletions mmv1/products/deploymentmanager/Deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
24 changes: 12 additions & 12 deletions mmv1/products/dlp/DeidentifyTemplate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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: |
Expand All @@ -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: |
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion mmv1/products/dlp/JobTrigger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading
Loading