Skip to content

Commit

Permalink
Removed MembershipRBACRoleBinding from ga provider (#8776) (#6155)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored and ScottSuarez committed Aug 25, 2023
1 parent 2f31c4e commit 257b34e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .changelog/8776.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:none

```
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func TestAccGKEHub2MembershipRBACRoleBinding_gkehubMembershipRbacRoleBindingBasi

acctest.VcrTest(t, resource.TestCase{
PreCheck: func() { acctest.AccTestPreCheck(t) },
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t),
ProtoV5ProviderFactories: acctest.ProtoV5ProviderBetaFactories(t),
CheckDestroy: testAccCheckGKEHub2MembershipRBACRoleBindingDestroyProducer(t),
Steps: []resource.TestStep{
{
Expand All @@ -60,23 +60,26 @@ func TestAccGKEHub2MembershipRBACRoleBinding_gkehubMembershipRbacRoleBindingBasi
func testAccGKEHub2MembershipRBACRoleBinding_gkehubMembershipRbacRoleBindingBasicExample(context map[string]interface{}) string {
return acctest.Nprintf(`
resource "google_container_cluster" "primary" {
provider = google-beta
name = "basiccluster%{random_suffix}"
location = "us-central1-a"
initial_node_count = 1
}
resource "google_gke_hub_membership" "membershiprbacrolebinding" {
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" "membershiprbacrolebinding" {
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 @@ -87,7 +90,9 @@ resource "google_gke_hub_membership_rbac_role_binding" "membershiprbacrolebindin
depends_on = [google_gke_hub_membership.membershiprbacrolebinding]
}
data "google_project" "project" {}
data "google_project" "project" {
provider = google-beta
}
`, context)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ description: |-

RBACRoleBinding represents a rbacrolebinding across the Fleet.

~> **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider.
See [Provider Versions](https://terraform.io/docs/providers/google/guides/provider_versions.html) for more details on beta resources.

To get more information about MembershipRBACRoleBinding, see:

Expand All @@ -33,23 +35,26 @@ To get more information about MembershipRBACRoleBinding, see:

```hcl
resource "google_container_cluster" "primary" {
provider = google-beta
name = "basiccluster"
location = "us-central1-a"
initial_node_count = 1
}
resource "google_gke_hub_membership" "membershiprbacrolebinding" {
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" "membershiprbacrolebinding" {
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 @@ -60,7 +65,9 @@ resource "google_gke_hub_membership_rbac_role_binding" "membershiprbacrolebindin
depends_on = [google_gke_hub_membership.membershiprbacrolebinding]
}
data "google_project" "project" {}
data "google_project" "project" {
provider = google-beta
}
```

## Argument Reference
Expand Down

0 comments on commit 257b34e

Please sign in to comment.