Last active
February 4, 2021 21:32
-
-
Save eculver/78b533603ba2b2b34f1fd41f8713fea8 to your computer and use it in GitHub Desktop.
Revisions
-
eculver revised this gist
Aug 12, 2019 . 1 changed file with 23 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ # this defines a role "role-name" in the account where this TF will be applied resource "aws_iam_role" "role_name" { name = "role-name" description = "Allows role-name to do things in account" assume_role_policy = "${data.aws_iam_policy_document.my_role.json}" } # this says that any one in a separate account with ID 123456789012 can assume the "role-name" role data "aws_iam_policy_document" "role_name" { statement { actions = [ "sts:AssumeRole", ] principals { type = "AWS" identifiers = [ "arn:aws:iam::123456789012:root", ] } } } -
eculver created this gist
Aug 12, 2019 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ { "Sid": "", "Effect": "Allow", "Action": "ssm:DescribeParameters", "Resource": "arn:aws:ssm:*:*:*" }, { "Sid": "", "Effect": "Allow", "Action": [ "ssm:GetParametersByPath", "ssm:GetParameters" ], "Resource": "arn:aws:ssm:*:*:parameter/service/*" }, { "Sid": "", "Effect": "Allow", "Action": [ "kms:ListKeys", "kms:ListAliases", "kms:Describe*", "kms:Decrypt" ], "Resource": "parameter_store_key" }