@@ -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
6168resource "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
238290locals {
@@ -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
0 commit comments