Skip to content

Commit

Permalink
Add labels field to the GKEHub Membership Binding resource (GoogleClo…
Browse files Browse the repository at this point in the history
…udPlatform#8880)

* Adding Terraform resources for Tenancy APIs in GKEHub

* Segregating MembershipBinding and MembershipRBACRoleBinding to keep things simpler in the review

* Fixing the docu URIs

* Adding TF support for Tenancy API for Membership Binding

* Adding dependent membership binding to the same commit chain

* Making Scope un-updatable and replacing hard coded project number with the one from test env

* Making Scope RRBAC updatable

* Making Namespace immutable

* Adding update test cases

* Removing all memberships field from Scope since it is no longer supported

* Removing all_memberships field for Scope from all test cases

* Add labels field to the Membership Binding resource
  • Loading branch information
sahsagar-google authored and joelkattapuram committed Sep 20, 2023
1 parent e6334ab commit dc6a334
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mmv1/products/gkehub2/MembershipBinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,7 @@ properties:
- :READY
- :DELETING
- :UPDATING
- !ruby/object:Api::Type::KeyValuePairs
name: 'labels'
description: |
Labels for this Membership binding.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ resource "google_gke_hub_membership_binding" "<%= ctx[:primary_resource_id] %>"
scope = google_gke_hub_scope.<%= ctx[:primary_resource_id] %>.name
membership_id = "tf-test-membership%{random_suffix}"
location = "global"
labels = {
keyb = "valueb"
keya = "valuea"
keyc = "valuec"
}
depends_on = [
google_gke_hub_membership.<%= ctx[:primary_resource_id] %>,
google_gke_hub_scope.<%= ctx[:primary_resource_id] %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ resource "google_gke_hub_membership_binding" "example" {
scope = google_gke_hub_scope.example.name
membership_id = "tf-test-membership%{random_suffix}"
location = "global"
labels = {
keyb = "valueb"
keya = "valuea"
keyc = "valuec"
}
depends_on = [
google_gke_hub_membership.example,
google_gke_hub_scope.example
Expand Down Expand Up @@ -108,6 +113,11 @@ resource "google_gke_hub_membership_binding" "example" {
scope = google_gke_hub_scope.example2.name
membership_id = "tf-test-membership%{random_suffix}"
location = "global"
labels = {
updated_keyb = "updated_valueb"
updated_keya = "updated_valuea"
updated_keyc = "updated_valuec"
}
depends_on = [
google_gke_hub_membership.example,
google_gke_hub_scope.example2
Expand Down

0 comments on commit dc6a334

Please sign in to comment.