Created
September 30, 2022 19:58
-
-
Save timmyers/b73421664519c639d078c36baf709205 to your computer and use it in GitHub Desktop.
Pulumi IaC IAM User Change #1
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
import * as aws from '@pulumi/aws'; | |
const defaultTags = { Creator: 'pulumi' }; | |
const timUser = new aws.iam.User('tim.myers', { | |
name: 'tim.myers', | |
tags: defaultTags, | |
}); | |
new aws.iam.UserPolicyAttachment('tim.myers-admin', { | |
user: timUser.name, | |
policyArn: aws.iam.getPolicyOutput({ name: 'AdministratorAccess'}).arn, | |
}); | |
new aws.iam.UserPolicyAttachment('tim.myers-password', { | |
user: timUser.name, | |
policyArn: aws.iam.getPolicyOutput({ name: 'IAMUserChangePassword'}).arn, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment