Skip to content

Commit

Permalink
Set labels for the resource compute interconnect (GoogleCloudPlatform…
Browse files Browse the repository at this point in the history
  • Loading branch information
zli82016 authored Sep 25, 2024
1 parent b404920 commit ffad9be
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mmv1/products/compute/Interconnect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ async:
message: 'message'
custom_code:
constants: 'templates/terraform/constants/interconnect.go.tmpl'
post_create: 'templates/terraform/post_create/labels.tmpl'
examples:
- name: 'compute_interconnect_basic'
primary_resource_id: 'example-interconnect'
Expand Down Expand Up @@ -290,11 +291,15 @@ properties:
output: true
- name: 'labels'
type: KeyValueLabels
update_url: 'projects/{{project}}/global/interconnects/{{name}}/setLabels'
update_verb: 'POST'
description: |
Labels for this resource. These can only be added or modified by the setLabels
method. Each label key/value pair must comply with RFC1035. Label values may be empty.
- name: 'labelFingerprint'
type: Fingerprint
update_url: 'projects/{{project}}/global/interconnects/{{name}}/setLabels'
update_verb: 'POST'
description: |
A fingerprint for the labels being applied to this Interconnect, which is essentially a hash
of the labels set used for optimistic locking. The fingerprint is initially generated by
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ resource "google_compute_interconnect" "{{$.PrimaryResourceId}}" {
macsec_enabled = false
noc_contact_email = "[email protected]"
requested_features = []
labels = {
mykey = "myvalue"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ resource "google_compute_interconnect" "example-interconnect" {
macsec_enabled = false
noc_contact_email = "[email protected]"
requested_features = ["IF_MACSEC"]
labels = {
mykey = "myvalue"
}
}
`, context)
}
Expand Down Expand Up @@ -85,6 +88,9 @@ resource "google_compute_interconnect" "example-interconnect" {
}
fail_open = true
}
labels = {
mykey = "newvalue"
}
}
`, context)
}

0 comments on commit ffad9be

Please sign in to comment.