Skip to content

Commit

Permalink
Apply new labels model to more resources (part 2)
Browse files Browse the repository at this point in the history
  • Loading branch information
zli82016 committed Sep 17, 2023
1 parent 0ef602f commit b16eddc
Show file tree
Hide file tree
Showing 62 changed files with 142 additions and 87 deletions.
2 changes: 1 addition & 1 deletion mmv1/products/compute/Disk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ properties:
name: 'lastDetachTimestamp'
description: 'Last detach timestamp in RFC3339 text format.'
output: true
- !ruby/object:Api::Type::KeyValuePairs
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: |
Labels to apply to this disk. A list of key->value pairs.
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/compute/ExternalVpnGateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ properties:
- !ruby/object:Api::Type::String
name: 'description'
description: 'An optional description of this resource.'
- !ruby/object:Api::Type::KeyValuePairs
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: 'Labels for the external VPN gateway resource.'
update_verb: :POST
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 @@ -170,7 +170,7 @@ properties:
The service account being used for the encryption request for the
given KMS key. If absent, the Compute Engine default service
account is used.
- !ruby/object:Api::Type::KeyValuePairs
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: Labels to apply to this Image.
update_verb: :POST
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/compute/Instance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ properties:
internally during updates.
update_url: 'projects/{{project}}/zones/{{zone}}/instances/{{name}}/setLabels'
update_verb: :POST
- !ruby/object:Api::Type::KeyValuePairs
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: |
Labels to apply to this instance. A list of key->value pairs.
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/compute/RegionDisk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ properties:
name: 'lastDetachTimestamp'
description: 'Last detach timestamp in RFC3339 text format.'
output: true
- !ruby/object:Api::Type::KeyValuePairs
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: |
Labels to apply to this disk. A list of key->value pairs.
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/compute/Snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ properties:
imports: 'selfLink'
description: 'A reference to a license associated with this snapshot'
custom_expand: 'templates/terraform/custom_expand/array_resourceref_with_validation.go.erb'
- !ruby/object:Api::Type::KeyValuePairs
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: Labels to apply to this Snapshot.
update_verb: :POST
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/dialogflowcx/Intent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ properties:
description: |
Indicates whether this is a fallback intent. Currently only default fallback intent is allowed in the agent, which is added upon agent creation.
Adding training phrases to fallback intent is useful in the case of requests that are mistakenly matched, since training phrases assigned to fallback intents act as negative examples that triggers no-match event.
- !ruby/object:Api::Type::KeyValuePairs
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: |
The key/value metadata to label an intent. Labels can contain lowercase letters, digits and the symbols '-' and '_'. International characters are allowed, including letters from unicase alphabets. Keys must start with a letter. Keys and values can be no longer than 63 characters and no more than 128 bytes.
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/dns/ManagedZone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ properties:
The time that this resource was created on the server.
This is in RFC3339 text format.
output: true
- !ruby/object:Api::Type::KeyValuePairs
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: |
A set of key/value label pairs to assign to this ManagedZone.
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/filestore/Backup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ properties:
description: |
The time when the snapshot was created in RFC3339 text format.
output: true
- !ruby/object:Api::Type::KeyValuePairs
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: |
Resource labels to represent user-provided metadata.
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/filestore/Instance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ properties:
Possible values include: STANDARD, PREMIUM, BASIC_HDD, BASIC_SSD, HIGH_SCALE_SSD and ENTERPRISE
required: true
immutable: true
- !ruby/object:Api::Type::KeyValuePairs
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: |
Resource labels to represent user-provided metadata.
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/filestore/Snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ properties:
description: |
The time when the snapshot was created in RFC3339 text format.
output: true
- !ruby/object:Api::Type::KeyValuePairs
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: |
Resource labels to represent user-provided metadata.
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/gkehub/Membership.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ properties:
min_version: beta
description: |
The name of this entity type to be displayed on the console. This field is unavailable in v1 of the API.
- !ruby/object:Api::Type::KeyValuePairs
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: |
Labels to apply to this membership.
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/gkehub2/MembershipBinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ properties:
- :READY
- :DELETING
- :UPDATING
- !ruby/object:Api::Type::KeyValuePairs
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: |
Labels for this Membership binding.
2 changes: 1 addition & 1 deletion mmv1/products/gkehub2/Namespace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ properties:
Scope. Scope-level labels (`namespace_labels` in the Fleet Scope
resource) take precedence over Namespace-level labels if they share
a key. Keys and values must be Kubernetes-conformant.
- !ruby/object:Api::Type::KeyValuePairs
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: |
Labels for this Namespace.
2 changes: 1 addition & 1 deletion mmv1/products/gkehub2/Scope.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ properties:
- :READY
- :DELETING
- :UPDATING
- !ruby/object:Api::Type::KeyValuePairs
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: |
Labels for this Scope.
2 changes: 1 addition & 1 deletion mmv1/products/gkehub2/ScopeRBACRoleBinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ properties:
- :ADMIN
- :EDIT
- :VIEW
- !ruby/object:Api::Type::KeyValuePairs
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: |
Labels for this ScopeRBACRoleBinding.
2 changes: 1 addition & 1 deletion mmv1/products/kms/CryptoKey.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ properties:
immutable: true
url_param_only: true
ignore_read: true
- !ruby/object:Api::Type::KeyValuePairs
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: |
Labels with user-defined metadata to apply to this resource.
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/memcache/Instance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ properties:
name: 'discoveryEndpoint'
description: Endpoint for Discovery API
output: true
- !ruby/object:Api::Type::KeyValuePairs
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: |
Resource labels to represent user-provided metadata.
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/metastore/Federation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ properties:
output: true
description: |
The relative resource name of the metastore federation.
- !ruby/object:Api::Type::KeyValuePairs
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: 'User-defined labels for the metastore federation.'
- !ruby/object:Api::Type::String
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/metastore/Service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ properties:
output: true
description: |
The relative resource name of the metastore service.
- !ruby/object:Api::Type::KeyValuePairs
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: 'User-defined labels for the metastore service.'
# This is an x-product resource reference.
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/mlengine/Model.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,6 @@ properties:
description:
If true, online prediction nodes send stderr and stdout streams to
Stackdriver Logging
- !ruby/object:Api::Type::KeyValuePairs
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: One or more labels that you can add, to organize your models.
2 changes: 1 addition & 1 deletion mmv1/products/networkmanagement/ConnectivityTest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ properties:
This is applicable to scenarios where a test can cross project
boundaries.
item_type: Api::Type::String
- !ruby/object:Api::Type::KeyValuePairs
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: |
Resource labels to represent user-provided metadata.
2 changes: 1 addition & 1 deletion mmv1/products/networksecurity/AuthorizationPolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ properties:
description: |
Time the AuthorizationPolicy was updated in UTC.
output: true
- !ruby/object:Api::Type::KeyValuePairs
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description:
Set of label tags associated with the AuthorizationPolicy resource.
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/networksecurity/ClientTlsPolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ properties:
description: |
Time the ClientTlsPolicy was updated in UTC.
output: true
- !ruby/object:Api::Type::KeyValuePairs
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: Set of label tags associated with the ClientTlsPolicy resource.
- !ruby/object:Api::Type::String
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/networksecurity/ServerTlsPolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ properties:
description: |
Time the ServerTlsPolicy was updated in UTC.
output: true
- !ruby/object:Api::Type::KeyValuePairs
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: Set of label tags associated with the ServerTlsPolicy resource.
- !ruby/object:Api::Type::String
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/networkservices/EdgeCacheKeyset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ properties:
name: 'description'
description: |
A human-readable description of the resource.
- !ruby/object:Api::Type::KeyValuePairs
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: 'Set of label tags associated with the EdgeCache resource.'
- !ruby/object:Api::Type::Array
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/networkservices/EdgeCacheOrigin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ properties:
name: 'description'
description: |
A human-readable description of the resource.
- !ruby/object:Api::Type::KeyValuePairs
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: 'Set of label tags associated with the EdgeCache resource.'
- !ruby/object:Api::Type::String
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/networkservices/EdgeCacheService.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ properties:
name: 'description'
description: |
A human-readable description of the resource.
- !ruby/object:Api::Type::KeyValuePairs
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: 'Set of label tags associated with the EdgeCache resource.'
- !ruby/object:Api::Type::Boolean
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/networkservices/EndpointPolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ properties:
description: |
Time the TcpRoute was updated in UTC.
output: true
- !ruby/object:Api::Type::KeyValuePairs
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: Set of label tags associated with the TcpRoute resource.
- !ruby/object:Api::Type::String
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/networkservices/Gateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ properties:
description: |
Time the AccessPolicy was updated in UTC.
output: true
- !ruby/object:Api::Type::KeyValuePairs
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: Set of label tags associated with the Gateway resource.
- !ruby/object:Api::Type::String
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/networkservices/GrpcRoute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ properties:
description: |
Time the GrpcRoute was updated in UTC.
output: true
- !ruby/object:Api::Type::KeyValuePairs
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: Set of label tags associated with the GrpcRoute resource.
- !ruby/object:Api::Type::String
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/networkservices/HttpRoute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ properties:
description: |
Time the HttpRoute was updated in UTC.
output: true
- !ruby/object:Api::Type::KeyValuePairs
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: Set of label tags associated with the HttpRoute resource.
- !ruby/object:Api::Type::String
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/networkservices/Mesh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ properties:
description: |
Time the Mesh was updated in UTC.
output: true
- !ruby/object:Api::Type::KeyValuePairs
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: Set of label tags associated with the Mesh resource.
- !ruby/object:Api::Type::String
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/networkservices/ServiceBinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ properties:
description: |
Time the ServiceBinding was updated in UTC.
output: true
- !ruby/object:Api::Type::KeyValuePairs
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: Set of label tags associated with the ServiceBinding resource.
- !ruby/object:Api::Type::String
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/networkservices/TcpRoute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ properties:
description: |
Time the TcpRoute was updated in UTC.
output: true
- !ruby/object:Api::Type::KeyValuePairs
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: Set of label tags associated with the TcpRoute resource.
- !ruby/object:Api::Type::String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@ resource "google_dataproc_metastore_service" "<%= ctx[:primary_resource_id] %>"
hive_metastore_config {
version = "2.3.6"
}

labels = {
env = "test"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,8 @@ resource "google_gke_hub_membership" "membership" {
resource_link = "//container.googleapis.com/${google_container_cluster.primary.id}"
}
}

labels = {
env = "test"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ resource "google_memcache_instance" "<%= ctx[:primary_resource_id] %>" {
name = "<%= ctx[:vars]["instance_name"] %>"
authorized_network = google_service_networking_connection.private_service_connection.network

labels = {
env = "test"
}

node_config {
cpu_count = 1
memory_size_mb = 1024
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ resource "google_network_management_connectivity_test" "<%= ctx[:primary_resourc
}

protocol = "TCP"
labels = {
env = "test"
}
}

resource "google_compute_instance" "source" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ func TestAccComputeDisk_update(t *testing.T) {
ResourceName: "google_compute_disk.foobar",
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"labels", "terraform_labels"},
},
{
Config: testAccComputeDisk_updated(diskName),
Expand All @@ -351,6 +352,7 @@ func TestAccComputeDisk_update(t *testing.T) {
ResourceName: "google_compute_disk.foobar",
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"labels", "terraform_labels"},
},
},
})
Expand Down Expand Up @@ -820,6 +822,7 @@ func TestAccComputeDisk_cloneDisk(t *testing.T) {
ResourceName: "google_compute_disk.disk-clone",
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"labels", "terraform_labels"},
},
},
})
Expand All @@ -841,6 +844,7 @@ func TestAccComputeDisk_featuresUpdated(t *testing.T) {
ResourceName: "google_compute_disk.foobar",
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"labels", "terraform_labels"},
},
{
Config: testAccComputeDisk_featuresUpdated(diskName),
Expand All @@ -849,6 +853,7 @@ func TestAccComputeDisk_featuresUpdated(t *testing.T) {
ResourceName: "google_compute_disk.foobar",
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"labels", "terraform_labels"},
},
},
})
Expand Down
Loading

0 comments on commit b16eddc

Please sign in to comment.