Created
April 24, 2020 04:17
-
-
Save officel/eaede624214f377077323a6d09336076 to your computer and use it in GitHub Desktop.
terraform で AWS IAM Group & User で PATH がセットされているとユーザ自身でパスワード変更できないのか
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
resource "aws_iam_group" "test" { | |
name = "test_path" | |
path = "/test/" | |
} | |
resource "aws_iam_group_policy_attachment" "test" { | |
group = aws_iam_group.test.name | |
policy_arn = "arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess" | |
} | |
resource "aws_iam_group_policy_attachment" "test2" { | |
group = aws_iam_group.test.name | |
policy_arn = "arn:aws:iam::aws:policy/IAMSelfManageServiceSpecificCredentials" | |
} | |
resource "aws_iam_group_policy_attachment" "test3" { | |
group = aws_iam_group.test.name | |
policy_arn = "arn:aws:iam::aws:policy/IAMUserChangePassword" | |
} | |
resource "aws_iam_user" "test" { | |
name = "test_path" | |
path = "/test/" | |
} | |
resource "aws_iam_user_group_membership" "test" { | |
user = aws_iam_user.test.name | |
groups = [ | |
aws_iam_group.test.name | |
] | |
} | |
resource "aws_iam_user" "user" { | |
name = "user" | |
path = "/path/" | |
} | |
resource "aws_iam_user_group_membership" "user" { | |
user = aws_iam_user.user.name | |
groups = [ | |
aws_iam_group.test.name | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment