Skip to content

Commit 5b3dca2

Browse files
committed
add foundation domains access for foundation folks
1 parent 3b78e9e commit 5b3dca2

File tree

4 files changed

+63
-1
lines changed

4 files changed

+63
-1
lines changed

terragrunt/accounts/root/aws-organization/.terraform.lock.hcl

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

terragrunt/accounts/root/aws-organization/terragrunt.hcl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,13 @@ inputs = {
4343
given_name = "Joel"
4444
family_name = "Marcey"
4545
46-
groups = ["billing"]
46+
groups = ["billing", "foundation"]
47+
}
48+
"walterpearce" = {
49+
given_name = "Walter"
50+
family_name = "Pearce"
51+
52+
groups = ["foundation"]
4753
}
4854
"kobzol" = {
4955
given_name = "Jakub"

terragrunt/modules/aws-organization/groups.tf

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ resource "aws_identitystore_group" "release" {
5656
description = "The release team"
5757
}
5858

59+
resource "aws_identitystore_group" "foundation" {
60+
identity_store_id = local.identity_store_id
61+
62+
display_name = "foundation"
63+
description = "Foundation staff"
64+
}
65+
5966
# The different permission sets a group may have assigned to it
6067

6168
resource "aws_ssoadmin_permission_set" "administrator_access" {
@@ -233,6 +240,51 @@ resource "aws_ssoadmin_permission_set_inline_policy" "start_release" {
233240
})
234241
}
235242

243+
// Foundation staff permissions to manage foundation domain names.
244+
245+
resource "aws_ssoadmin_permission_set" "foundation_domains" {
246+
instance_arn = local.instance_arn
247+
name = "FoundationDomains"
248+
}
249+
250+
resource "aws_ssoadmin_permission_set_inline_policy" "foundation_domains" {
251+
instance_arn = local.instance_arn
252+
permission_set_arn = aws_ssoadmin_permission_set.foundation_domains.arn
253+
254+
inline_policy = jsonencode({
255+
Version = "2012-10-17"
256+
Statement = [
257+
{
258+
Action = [
259+
"route53:GetHostedZoneCount",
260+
"route53:ListHostedZonesByName"
261+
]
262+
Effect = "Allow"
263+
Resource = "*"
264+
},
265+
{
266+
Action = [
267+
"route53:GetHostedZone",
268+
"route53:ListResourceRecordSets",
269+
"route53:ChangeResourceRecordSets"
270+
]
271+
Effect = "Allow"
272+
Resource = [
273+
"arn:aws:route53:::hostedzone/Z09586511TRS6GHW0FZPC", # rust-foundation.com
274+
"arn:aws:route53:::hostedzone/Z0959228U6T9PBL0KLAT", # rust-foundation.net
275+
"arn:aws:route53:::hostedzone/Z083357910BVS5OFF9F9K", # rust-foundation.org
276+
"arn:aws:route53:::hostedzone/Z06189704SC97VQ930HC", # rust.foundation
277+
"arn:aws:route53:::hostedzone/Z0832784OAW0HU8HSXC6", # rustfoundation.com
278+
"arn:aws:route53:::hostedzone/Z083279813DSO5ADQL7CI", # rustfoundation.net
279+
"arn:aws:route53:::hostedzone/Z09748712H3V27RXRFKZ1", # rustfoundation.org
280+
"arn:aws:route53:::hostedzone/Z04173281P9OQX2I22PFG", # therustfoundation.com
281+
"arn:aws:route53:::hostedzone/Z04105791KDJXQHQC6Y0V", # therustfoundation.org
282+
]
283+
}
284+
]
285+
})
286+
}
287+
236288
# The assignment of groups to accounts with their respective permission sets
237289

238290
locals {
@@ -263,6 +315,8 @@ locals {
263315
permissions : [aws_ssoadmin_permission_set.triagebot_access] },
264316
{ group : aws_identitystore_group.release,
265317
permissions : [aws_ssoadmin_permission_set.start_release] },
318+
{ group : aws_identitystore_group.foundation,
319+
permissions : [aws_ssoadmin_permission_set.foundation_domains] },
266320
]
267321
},
268322
# crates-io Staging

terragrunt/modules/aws-organization/users.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ locals {
77
metrics-initiative : aws_identitystore_group.metrics_initiative
88
release : aws_identitystore_group.release
99
triagebot : aws_identitystore_group.triagebot
10+
foundation : aws_identitystore_group.foundation
1011
}
1112

1213
# Expand var.users into collection of group memberships associations

0 commit comments

Comments
 (0)