Skip to content

Instantly share code, notes, and snippets.

@timo-boehm
Last active February 19, 2021 14:21
Show Gist options
  • Save timo-boehm/22d480fa575721acd82de47c12c9014b to your computer and use it in GitHub Desktop.
Save timo-boehm/22d480fa575721acd82de47c12c9014b to your computer and use it in GitHub Desktop.
data "aws_iam_policy" "read_only_access" {
arn = "arn:aws:iam::aws:policy/ReadOnlyAccess"
}
resource "aws_iam_user" "accountant" {
name = "just-looking"
}
resource "aws_iam_user_policy_attachment" "reading_is_fine" {
user = aws_iam_user.accountant
policy_arn = data.aws_iam_policy.read_only_access.arn
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment