-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a7aa9bc
commit bf0606c
Showing
2 changed files
with
17 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ func TestAccFolderIamBinding_basic(t *testing.T) { | |
{ | ||
Config: testAccFolderAssociateBindingBasic(org, fname), | ||
Check: resource.ComposeTestCheckFunc( | ||
testAccCheckGoogleFolderIamBindingExists("google_folder_iam_binding.acceptance", &cloudresourcemanager.Binding{ | ||
testAccCheckGoogleFolderIamBindingExists(&cloudresourcemanager.Binding{ | ||
Role: "roles/compute.instanceAdmin", | ||
Members: []string{"user:[email protected]"}, | ||
}, org, fname), | ||
|
@@ -63,7 +63,7 @@ func TestAccFolderIamBinding_multiple(t *testing.T) { | |
{ | ||
Config: testAccFolderAssociateBindingBasic(org, fname), | ||
Check: resource.ComposeTestCheckFunc( | ||
testAccCheckGoogleFolderIamBindingExists("google_folder_iam_binding.acceptance", &cloudresourcemanager.Binding{ | ||
testAccCheckGoogleFolderIamBindingExists(&cloudresourcemanager.Binding{ | ||
Role: "roles/compute.instanceAdmin", | ||
Members: []string{"user:[email protected]"}, | ||
}, org, fname), | ||
|
@@ -73,11 +73,11 @@ func TestAccFolderIamBinding_multiple(t *testing.T) { | |
{ | ||
Config: testAccFolderAssociateBindingMultiple(org, fname), | ||
Check: resource.ComposeTestCheckFunc( | ||
testAccCheckGoogleFolderIamBindingExists("google_folder_iam_binding.multiple", &cloudresourcemanager.Binding{ | ||
testAccCheckGoogleFolderIamBindingExists(&cloudresourcemanager.Binding{ | ||
Role: "roles/viewer", | ||
Members: []string{"user:[email protected]"}, | ||
}, org, fname), | ||
testAccCheckGoogleFolderIamBindingExists("google_folder_iam_binding.multiple", &cloudresourcemanager.Binding{ | ||
testAccCheckGoogleFolderIamBindingExists(&cloudresourcemanager.Binding{ | ||
Role: "roles/compute.instanceAdmin", | ||
Members: []string{"user:[email protected]"}, | ||
}, org, fname), | ||
|
@@ -108,11 +108,11 @@ func TestAccFolderIamBinding_multipleAtOnce(t *testing.T) { | |
{ | ||
Config: testAccFolderAssociateBindingMultiple(org, fname), | ||
Check: resource.ComposeTestCheckFunc( | ||
testAccCheckGoogleFolderIamBindingExists("google_folder_iam_binding.acceptance", &cloudresourcemanager.Binding{ | ||
testAccCheckGoogleFolderIamBindingExists(&cloudresourcemanager.Binding{ | ||
Role: "roles/compute.instanceAdmin", | ||
Members: []string{"user:[email protected]"}, | ||
}, org, fname), | ||
testAccCheckGoogleFolderIamBindingExists("google_folder_iam_binding.multiple", &cloudresourcemanager.Binding{ | ||
testAccCheckGoogleFolderIamBindingExists(&cloudresourcemanager.Binding{ | ||
Role: "roles/compute.instanceAdmin", | ||
Members: []string{"user:[email protected]"}, | ||
}, org, fname), | ||
|
@@ -143,7 +143,7 @@ func TestAccFolderIamBinding_update(t *testing.T) { | |
{ | ||
Config: testAccFolderAssociateBindingBasic(org, fname), | ||
Check: resource.ComposeTestCheckFunc( | ||
testAccCheckGoogleFolderIamBindingExists("google_folder_iam_binding.acceptance", &cloudresourcemanager.Binding{ | ||
testAccCheckGoogleFolderIamBindingExists(&cloudresourcemanager.Binding{ | ||
Role: "roles/compute.instanceAdmin", | ||
Members: []string{"user:[email protected]"}, | ||
}, org, fname), | ||
|
@@ -153,7 +153,7 @@ func TestAccFolderIamBinding_update(t *testing.T) { | |
{ | ||
Config: testAccFolderAssociateBindingUpdated(org, fname), | ||
Check: resource.ComposeTestCheckFunc( | ||
testAccCheckGoogleFolderIamBindingExists("google_folder_iam_binding.updated", &cloudresourcemanager.Binding{ | ||
testAccCheckGoogleFolderIamBindingExists(&cloudresourcemanager.Binding{ | ||
Role: "roles/compute.instanceAdmin", | ||
Members: []string{"user:[email protected]", "user:[email protected]"}, | ||
}, org, fname), | ||
|
@@ -163,7 +163,7 @@ func TestAccFolderIamBinding_update(t *testing.T) { | |
{ | ||
Config: testAccFolderAssociateBindingDropMemberFromBasic(org, fname), | ||
Check: resource.ComposeTestCheckFunc( | ||
testAccCheckGoogleFolderIamBindingExists("google_folder_iam_binding.dropped", &cloudresourcemanager.Binding{ | ||
testAccCheckGoogleFolderIamBindingExists(&cloudresourcemanager.Binding{ | ||
Role: "roles/compute.instanceAdmin", | ||
Members: []string{"user:[email protected]"}, | ||
}, org, fname), | ||
|
@@ -194,11 +194,11 @@ func TestAccFolderIamBinding_remove(t *testing.T) { | |
{ | ||
Config: testAccFolderAssociateBindingMultiple(org, fname), | ||
Check: resource.ComposeTestCheckFunc( | ||
testAccCheckGoogleFolderIamBindingExists("google_folder_iam_binding.multiple", &cloudresourcemanager.Binding{ | ||
testAccCheckGoogleFolderIamBindingExists(&cloudresourcemanager.Binding{ | ||
Role: "roles/viewer", | ||
Members: []string{"user:[email protected]"}, | ||
}, org, fname), | ||
testAccCheckGoogleFolderIamBindingExists("google_folder_iam_binding.acceptance", &cloudresourcemanager.Binding{ | ||
testAccCheckGoogleFolderIamBindingExists(&cloudresourcemanager.Binding{ | ||
Role: "roles/compute.instanceAdmin", | ||
Members: []string{"user:[email protected]"}, | ||
}, org, fname), | ||
|
@@ -215,7 +215,7 @@ func TestAccFolderIamBinding_remove(t *testing.T) { | |
}) | ||
} | ||
|
||
func testAccCheckGoogleFolderIamBindingExists(key string, expected *cloudresourcemanager.Binding, org, fname string) resource.TestCheckFunc { | ||
func testAccCheckGoogleFolderIamBindingExists(expected *cloudresourcemanager.Binding, org, fname string) resource.TestCheckFunc { | ||
return func(s *terraform.State) error { | ||
config := testAccProvider.Meta().(*Config) | ||
folderPolicy, err := getFolderIamPolicyByParentAndDisplayName("organizations/"+org, fname, config) | ||
|
@@ -314,7 +314,7 @@ resource "google_folder" "acceptance" { | |
display_name = "%s" | ||
} | ||
resource "google_folder_iam_binding" "dropped" { | ||
resource "google_folder_iam_binding" "acceptance" { | ||
folder = "${google_folder.acceptance.name}" | ||
members = ["user:[email protected]"] | ||
role = "roles/compute.instanceAdmin" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ func TestAccFolderIamMember_basic(t *testing.T) { | |
{ | ||
Config: testAccFolderAssociateMemberBasic(org, fname), | ||
Check: resource.ComposeTestCheckFunc( | ||
testAccCheckGoogleFolderIamBindingExists("google_folder_iam_member.acceptance", &cloudresourcemanager.Binding{ | ||
testAccCheckGoogleFolderIamBindingExists(&cloudresourcemanager.Binding{ | ||
Role: "roles/compute.instanceAdmin", | ||
Members: []string{"user:[email protected]"}, | ||
}, org, fname), | ||
|
@@ -61,7 +61,7 @@ func TestAccFolderIamMember_multiple(t *testing.T) { | |
{ | ||
Config: testAccFolderAssociateMemberBasic(org, fname), | ||
Check: resource.ComposeTestCheckFunc( | ||
testAccCheckGoogleFolderIamBindingExists("google_folder_iam_member.acceptance", &cloudresourcemanager.Binding{ | ||
testAccCheckGoogleFolderIamBindingExists(&cloudresourcemanager.Binding{ | ||
Role: "roles/compute.instanceAdmin", | ||
Members: []string{"user:[email protected]"}, | ||
}, org, fname), | ||
|
@@ -71,7 +71,7 @@ func TestAccFolderIamMember_multiple(t *testing.T) { | |
{ | ||
Config: testAccFolderAssociateMemberMultiple(org, fname), | ||
Check: resource.ComposeTestCheckFunc( | ||
testAccCheckGoogleFolderIamBindingExists("google_folder_iam_member.multiple", &cloudresourcemanager.Binding{ | ||
testAccCheckGoogleFolderIamBindingExists(&cloudresourcemanager.Binding{ | ||
Role: "roles/compute.instanceAdmin", | ||
Members: []string{"user:[email protected]", "user:[email protected]"}, | ||
}, org, fname), | ||
|
@@ -102,7 +102,7 @@ func TestAccFolderIamMember_remove(t *testing.T) { | |
{ | ||
Config: testAccFolderAssociateMemberMultiple(org, fname), | ||
Check: resource.ComposeTestCheckFunc( | ||
testAccCheckGoogleFolderIamBindingExists("google_folder_iam_member.acceptance", &cloudresourcemanager.Binding{ | ||
testAccCheckGoogleFolderIamBindingExists(&cloudresourcemanager.Binding{ | ||
Role: "roles/compute.instanceAdmin", | ||
Members: []string{"user:[email protected]", "user:[email protected]"}, | ||
}, org, fname), | ||
|