You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm struggling to get my head around updating the resource after another one was created. Here's an example:
import*asawsfrom"@pulumi/aws";import*asawsNativefrom"@pulumi/aws-native";import*assnowflakefrom"@pulumi/snowflake";constsnowpipeRole=newaws.iam.Role("snowpipe-role",{assumeRolePolicy: {Version: "2012-10-17",Statement: [{Effect: "Allow",Action: "sts:AssumeRole",Principal: {AWS: "arn:aws:iam::********:user/*******"}}]}});constreportsBucket=newawsNative.s3.Bucket("reports-bucket",{publicAccessBlockConfiguration: {blockPublicAcls: true,blockPublicPolicy: true,ignorePublicAcls: true,restrictPublicBuckets: true}});conststorageIntegration=newStorageIntegration("storage-integration",{enabled: true,storageProvider: "S3",storageAllowedLocations: [pulumi.interpolate`s3://${reportsBucket.id}/`],storageAwsRoleArn: snowpipeRole,},{dependsOn: reportsBucket});// after both storageIntegration and snowpipeRole are created,// I want to tighten up the security of snowpipeRole to only allow// specific external IDs. Here's an example of what I'm trying to achieve:updateAssumeRolePolicy(snowpipeRole,{Version: "2012-10-17",Statement: [{Effect: "Allow",Action: "sts:AssumeRole",Principal: {AWS: "arn:aws:iam::********:user/*******"}Condition: {StringEquals: {"sts:ExternalId": [storageIntegration.storageAwsExternalId]}}}]},{dependsOn: storageIntegration});
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I'm struggling to get my head around updating the resource after another one was created. Here's an example:
Beta Was this translation helpful? Give feedback.
All reactions