Skip to content

Commit

Permalink
Merge pull request #579 from rust-lang/chore-grant-jake-playground-ec…
Browse files Browse the repository at this point in the history
…2-ssh-permissions

chore: grant Jake playground ec2 ssh permissions
  • Loading branch information
marcoieni authored Sep 26, 2024
2 parents 78f1e4d + f373899 commit 7244dc7
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
3 changes: 2 additions & 1 deletion terraform/playground/instance.tf
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ resource "aws_instance" "playground2" {
}

tags = {
Name = "play-2"
Name = "play-2"
Service = "playground"
}

lifecycle {
Expand Down
23 changes: 23 additions & 0 deletions terraform/team-members-access/infra-deploy-playground.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,29 @@ resource "aws_iam_group_policy" "infra_deploy_playground" {
"arn:aws:ssm:us-west-1:890664054962:parameter/staging/ansible/all/*",
]
},
{
"Effect" : "Allow",
"Action" : "ec2-instance-connect:SendSSHPublicKey",
"Resource" : [
"arn:aws:ec2:*:*:instance/*",
],
"Condition" : {
"StringEquals" : {
"ec2:osuser" : "shep",
"ec2:ResourceTag/Service" : "playground"
}
}
},
{
"Effect" : "Allow",
"Action" : [
"ec2:DescribeInstances",
"ec2:DescribeVpcs"
],
"Resource" : [
"arn:aws:ec2:*:*:instance/*",
],
}
]
})
}

0 comments on commit 7244dc7

Please sign in to comment.