| index b58458f7d..f2d159c83 100644 |
| --- a/infra/modules/region-host/main.tf |
| +++ b/infra/modules/region-host/main.tf |
| @@ -696,6 +696,30 @@ resource "aws_iam_role_policy" "host_store" { |
| }) |
| } |
| |
| +# The console's own email (invite fallback, console-invite-delivery spec §4). |
| +# One identity, one From address. The configuration set and tenant are the |
| +# ops account's ("carlos-bab"), which SES checks on a tenant-attributed send. |
| +resource "aws_iam_role_policy" "host_console_mail" { |
| + count = var.console_mail_from == "" ? 0 : 1 |
| + name = "${var.iam_name}-console-mail" |
| + role = aws_iam_role.host.id |
| + policy = jsonencode({ |
| + Version = "2012-10-17" |
| + Statement = [{ |
| + Effect = "Allow" |
| + Action = ["ses:SendEmail"] |
| + Resource = [ |
| + "arn:aws:ses:${var.console_mail_region}:${data.aws_caller_identity.current.account_id}:identity/${split("@", var.console_mail_from)[1]}", |
| + "arn:aws:ses:${var.console_mail_region}:${data.aws_caller_identity.current.account_id}:configuration-set/carlos-bab", |
| + "arn:aws:ses:${var.console_mail_region}:${data.aws_caller_identity.current.account_id}:tenant/carlos-bab/*", |
| + ] |
| + Condition = { |
| + StringEquals = { "ses:FromAddress" = var.console_mail_from } |
| + } |
| + }] |
| + }) |
| +} |
| + |
| # ---- object storage scanning (opt-in) -------------------------------------- |
| # |
| # The one grant that lets this role read tenant object bytes, so it is its own |