https://pulumi.com logo
#aws
Title
m

millions-umbrella-34765

06/16/2023, 6:06 PM
I have a IAM Role and Policy (and the policy is attached to the role) that was created manually in AWS. I want to import it into Pulumi. I have the import working for the rose and policy. To make the attachment, the code is like
Copy code
const snowflakeS3PolicyAttachment = new aws.iam.PolicyAttachment(
        `sg-snowflake-s3-handshake-log-access-policy-attach-${envName}`,
        {
            roles: [snowflakeS3AccessRole],
            policyArn: snowflakeS3Policy.arn
        }
    );
but how do I refer to the existing attachments for the
{import: "????"}
statement? I'm not aware of a name or ARN to refer to the attachment
hmm... when I did a preview (withou the import on the attachment ), it said it was going to import the role and policy and create the attachment. on running
up
I thought it might create an additional attachment but it did not. So it's smart enough to handle the situation with an import on the attachment code.
2 Views