Skip to content

Instantly share code, notes, and snippets.

@madagra
Last active November 3, 2021 22:29
Show Gist options
  • Save madagra/51bc44fd9e7500a481da8d294aaa3320 to your computer and use it in GitHub Desktop.
Save madagra/51bc44fd9e7500a481da8d294aaa3320 to your computer and use it in GitHub Desktop.
resource "aws_iam_policy" "snapshot_passrole_policy" {
name = "snapshot_passrole_policy"
path = "/"
description = "Allow role to assume the snapshot role to create OpenSearch snapshots"
policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "iam:PassRole",
"Resource": "${aws_iam_role.snapshot_role.arn}"
}
]
}
EOF
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment