Skip to content

Commit

Permalink
Bucket IAM Binding Import regression test (#1969)
Browse files Browse the repository at this point in the history
Adds a regression test for
#1900
  • Loading branch information
VenelinMartinov authored May 3, 2024
1 parent abdcea5 commit c817fe5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
7 changes: 6 additions & 1 deletion provider/provider_yaml_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,7 @@ func pulumiTestDeleteFromState(ptest *pulumitest.PulumiTest, resourceURN string)
pulumiTestExec(ptest, arguments...)
}

func TestLabelImport(t *testing.T) {
func TestImport(t *testing.T) {
for _, tc := range []struct {
testName string
programPath string
Expand All @@ -922,6 +922,11 @@ func TestLabelImport(t *testing.T) {
resourceType: "gcp:storage/bucket:Bucket",
explicitProvider: true,
},
{
testName: "bucket-iam-binding",
programPath: filepath.Join("test-programs", "bucket-iam-binding"),
resourceType: "gcp:storage/bucketIAMBinding:BucketIAMBinding",
},
} {
t.Run(tc.testName, func(t *testing.T) {
test := pulumiTest(t, tc.programPath)
Expand Down
17 changes: 17 additions & 0 deletions provider/test-programs/bucket-iam-binding/Pulumi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: bucket-iam-binding
runtime: yaml
resources:
mybucket:
properties:
location: US
type: gcp:storage:Bucket
resource:
type: gcp:storage:BucketIAMBinding
properties:
bucket: ${mybucket.name}
role: roles/storage.objectAdmin
members:
- "allAuthenticatedUsers"
outputs:
resourceId: "${mybucket.name} roles/storage.objectAdmin"
resourceUrn: ${resource.urn}

0 comments on commit c817fe5

Please sign in to comment.