Skip to content

Commit

Permalink
Removed MembershipRBACRoleBinding from ga provider (GoogleCloudPlatfo…
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottSuarez authored and RileyHYZ committed Sep 15, 2023
1 parent bc42829 commit 66836ec
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions mmv1/products/gkehub2/MembershipRBACRoleBinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ base_url: 'projects/{{project}}/locations/{{location}}/memberships/{{membership_
create_url: 'projects/{{project}}/locations/{{location}}/memberships/{{membership_id}}/rbacrolebindings/?rbacrolebinding_id={{membership_rbac_role_binding_id}}'
self_link: 'projects/{{project}}/locations/{{location}}/memberships/{{membership_id}}/rbacrolebindings/{{membership_rbac_role_binding_id}}'
immutable: true
min_version: beta
description: |
RBACRoleBinding represents a rbacrolebinding across the Fleet.
references: !ruby/object:Api::Resource::ReferenceLinks
Expand Down Expand Up @@ -47,6 +48,7 @@ examples:
name: 'gkehub_membership_rbac_role_binding_basic'
primary_resource_name: 'fmt.Sprintf(\"tf-test-membership%s\", context[\"random_suffix\"]), fmt.Sprintf(\"tf-test-rbac-role-binding%s\", context[\"random_suffix\"])'
primary_resource_id: 'membershiprbacrolebinding'
min_version: beta
vars:
cluster_name: "basiccluster"
test_env_vars:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
resource "google_container_cluster" "primary" {
provider = google-beta
name = "<%= ctx[:vars]['cluster_name'] %>"
location = "us-central1-a"
initial_node_count = 1
}

resource "google_gke_hub_membership" "<%= ctx[:primary_resource_id] %>" {
provider = google-beta
membership_id = "tf-test-membership%{random_suffix}"
endpoint {
gke_cluster {
resource_link = "//container.googleapis.com/${google_container_cluster.primary.id}"
}
}

depends_on = [google_container_cluster.primary]
}

resource "google_gke_hub_membership_rbac_role_binding" "<%= ctx[:primary_resource_id] %>" {
provider = google-beta
membership_rbac_role_binding_id = "tf-test-membership-rbac-role-binding%{random_suffix}"
membership_id = "tf-test-membership%{random_suffix}"
user = "service-${data.google_project.project.number}@gcp-sa-anthossupport.iam.gserviceaccount.com"
Expand All @@ -26,4 +29,6 @@ resource "google_gke_hub_membership_rbac_role_binding" "<%= ctx[:primary_resourc
depends_on = [google_gke_hub_membership.<%= ctx[:primary_resource_id] %>]
}

data "google_project" "project" {}
data "google_project" "project" {
provider = google-beta
}

0 comments on commit 66836ec

Please sign in to comment.