Skip to content

feat(atlassian): give a group every java.no account with all_java_no_accounts - #148

Merged
Alexanderamiri merged 1 commit into
mainfrom
feat/atlassian-all-accounts
Oct 24, 2026
Merged

Alexanderamiri merged 1 commit into
mainfrom
feat/atlassian-all-accounts

Conversation

@Alexanderamiri

Copy link
Copy Markdown
Member

What

  • atlassian.py: a group with all_java_no_accounts: true also gets every active, managed @java.no account. Those are exactly the Google Workspace users, because the Google user sync mirrors them into Atlassian. Unmanaged accounts on a java.no address (e.g. the old drift@java.no login) and inactive accounts are excluded.
  • provision-atlassian.py passes the flag through.
  • Still report-only (atlassian_sync_apply unchanged).

Why

Confluence access should cover everyone with a java.no Google account, not just helter.

Verification

  • Unit tests: lambda-src 63 OK, scripts 31 OK.
  • Live report run with registry#39's updated YAML: confluence-users +47 / −118 (all 118 removals are personal accounts), no member missing an account, no java.no account removed.

Merge order

After this applies, merge javaBin/registry#39 (it uses the flag). Note: main's apply is currently blocked behind #135's HIGH-risk destroys and needs the board override; this change rides along.

🤖 Generated with Claude Code

…accounts

A group in atlassian.yaml can set all_java_no_accounts to include every
active managed @java.no account — everyone with a java.no Google account,
since the Google Workspace user sync mirrors them into Atlassian. Meant for
confluence-users, so Confluence access isn't limited to heroes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Alexanderamiri
Alexanderamiri requested a review from a team as a code owner October 24, 2026 10:00
@github-actions

Copy link
Copy Markdown

Terraform Plan

🚧 Changes detected — Plan: 0 to add, 2 to change, 231 to destroy.

Plan output
Acquiring state lock. This may take a few moments...
aws_ssm_parameter.atlassian_org_id: Refreshing state... [id=/javabin/platform/atlassian-org-id]
aws_ssm_parameter.atlassian_api_key: Refreshing state... [id=/javabin/platform/atlassian-api-key]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  ~ update in-place
  - destroy

Terraform will perform the following actions:

  # module.iam.aws_iam_policy.team_guardrails["cake"] will be destroyed
  # (because key ["cake"] is not in for_each map)
  - resource "aws_iam_policy" "team_guardrails" {
      - arn              = "arn:aws:iam::553637109631:policy/javabin-team-cake-guardrails" -> null
      - attachment_count = 0 -> null
      - description      = "Developer boundary rules for team cake, for its Identity Center permission set" -> null
      - id               = "arn:aws:iam::553637109631:policy/javabin-team-cake-guardrails" -> null
      - name             = "javabin-team-cake-guardrails" -> null
      - path             = "/" -> null
      - policy           = jsonencode(
            {
              - Statement = [
                  - {
                      - Action   = "*"
                      - Effect   = "Allow"
                      - Resource = "*"
                      - Sid      = "Allow"
                    },
                  - {
                      - Action   = [
                          - "iam:DeletePolicy",
                          - "iam:DeletePolicyVersion",
                          - "iam:CreatePolicyVersion",
                          - "iam:SetDefaultPolicyVersion",
                          - "iam:CreatePolicy",
                          - "iam:TagPolicy",
                          - "iam:UntagPolicy",
                        ]
                      - Effect   = "Deny"
                      - Resource = [
                          - "arn:aws:iam::553637109631:policy/javabin-developer-boundary",
                          - "arn:aws:iam::553637109631:policy/javabin-team-*-guardrails",
                        ]
                      - Sid      = "DenyBndMod"
                    },
                  - {
                      - Action    = [
                          - "iam:CreateRole",
                          - "iam:PutRolePermissionsBoundary",
                        ]
                      - Condition = {
                          - StringNotEquals = {
                              - "iam:PermissionsBoundary" = "arn:aws:iam::553637109631:policy/javabin-developer-boundary"
                            }
                        }
                      - Effect    = "Deny"
                      - Resource  = "*"
                      - Sid       = "DenyNoBnd"
                    },
                  - {
                      - Action   = "iam:DeleteRolePermissionsBoundary"
                      - Effect   = "Deny"
                      - Resource = "*"
                      - Sid      = "DenyStripBnd"
                    },
                  - {
                      - Action   = [
                          - "iam:CreateUser",
                          - "iam:CreateLoginProfile",
                          - "iam:UpdateLoginProfile",
                          - "iam:CreateAccessKey",
                          - "iam:DeactivateMFADevice",
                        ]
                      - Effect   = "Deny"
                      - Resource = "*"
                      - Sid      = "DenyIAMUsers"
                    },
                  - {
                      - Action   = [
                          - "organizations:*",
                          - "sso:*",
                          - "sso-directory:*",
                          - "identitystore:*",
                          - "account:*",
                        ]
                      - Effect   = "Deny"
                      - Resource = "*"
                      - Sid      = "DenyOrgSSO"
                    },
                  - {
                      - Action   = [
                          - "ec2:CreateVpc",
                          - "ec2:DeleteVpc",
                          - "ec2:ModifyVpcAttribute",
                          - "ec2:CreateSubnet",
                          - "ec2:DeleteSubnet",
                          - "ec2:CreateInternetGateway",
                          - "ec2:DeleteInternetGateway",
                          - "ec2:AttachInternetGateway",
                          - "ec2:DetachInternetGateway",
                          - "ec2:CreateNatGateway",
                          - "ec2:DeleteNatGateway",
                          - "ec2:CreateRouteTable",
                          - "ec2:DeleteRouteTable",
                        ]
                      - Effect   = "Deny"
                      - Resource = "*"
                      - Sid      = "DenyNetwork"
                    },
                  - {
                      - Action   = [
                          - "ecs:DeleteCluster",
                          - "ecs:UpdateCluster",
                          - "elasticloadbalancing:DeleteLoadBalancer",
                          - "elasticloadbalancing:ModifyLoadBalancerAttributes",
                          - "s3:DeleteBucket",
                          - "s3:PutBucketPolicy",
                          - "s3:DeleteBucketPolicy",
                          - "s3:PutBucketVersioning",
                          - "s3:PutEncryptionConfiguration",
                          - "dynamodb:DeleteTable",
                          - "dynamodb:UpdateTable",
                        ]
                      - Effect   = "Deny"
                      - Resource = [
                          - "arn:aws:ecs:eu-central-1:553637109631:cluster/javabin-platform",
                          - "arn:aws:elasticloadbalancing:eu-central-1:553637109631:loadbalancer/app/javabin-*",
                          - "arn:aws:s3:::javabin-terraform-*",
                          - "arn:aws:s3:::javabin-ci-*",
                          - "arn:aws:dynamodb:eu-central-1:553637109631:table/javabin-terraform-*",
                        ]
                      - Sid      = "DenyPlatInfra"
                    },
                  - {
                      - Action   = [
                          - "guardduty:*",
                          - "securityhub:*",
                          - "config:*",
                          - "cloudtrail:*",
                          - "bedrock:Invoke*",
                          - "bedrock:Converse*",
                        ]
                      - Effect   = "Deny"
                      - Resource = "*"
                      - Sid      = "DenySecSvcs"
                    },
                  - {
                      - Action      = "*"
                      - Condition   = {
                          - Null            = {
                              - "aws:ResourceTag/team" = "false"
                            }
                          - StringNotEquals = {
                              - "aws:ResourceTag/team" = [
                                  - "cake",
                                  - "shared",
                                ]
                            }
                        }
                      - Effect      = "Deny"
                      - NotResource = [
                          - "arn:aws:s3:::javabin-terraform-state-553637109631",
                          - "arn:aws:s3:::javabin-terraform-state-553637109631/*",
                          - "arn:aws:dynamodb:eu-central-1:553637109631:table/javabin-terraform-app-locks",
                          - "arn:aws:s3:::javabin-ci-plan-artifacts-553637109631",
                          - "arn:aws:s3:::javabin-ci-plan-artifacts-553637109631/*",
                        ]
                      - Sid         = "DenyXTeam"
                    },
                  - {
                      - Action    = [
                          - "ec2:Delete*",
                          - "ec2:Modify*",
                          - "elasticloadbalancing:Delete*",
                          - "elasticloadbalancing:Modify*",
                          - "ecs:DeleteCluster",
                          - "ecs:UpdateCluster",
                          - "ecs:UpdateClusterSettings",
                          - "iam:DeleteRole",
                          - "iam:UpdateRole",
                          - "iam:DeleteRolePolicy",
                          - "iam:UpdateAssumeRolePolicy",
                          - "iam:PutRolePolicy",
                          - "iam:AttachRolePolicy",
                          - "iam:DetachRolePolicy",
                          - "route53:DeleteHostedZone",
                          - "sns:DeleteTopic",
                          - "sns:SetTopicAttributes",
                          - "ec2:AuthorizeSecurityGroup*",
                          - "ec2:RevokeSecurityGroup*",
                        ]
                      - Condition = {
                          - StringEquals = {
                              - "aws:ResourceTag/team" = "shared"
                            }
                        }
                      - Effect    = "Deny"
                      - Resource  = "*"
                      - Sid       = "DenyShared"
                    },
                  - {
                      - Action    = [
                          - "ec2:DeleteTags",
                          - "ec2:CreateTags",
                          - "ecs:TagResource",
                          - "ecs:UntagResource",
                          - "elasticloadbalancing:AddTags",
                          - "elasticloadbalancing:RemoveTags",
                          - "iam:TagRole",
                          - "iam:UntagRole",
                          - "sns:TagResource",
                          - "sns:UntagResource",
                        ]
                      - Condition = {
                          - StringEquals = {
                              - "aws:ResourceTag/team" = [
                                  - "shared",
                                  - "platform",
                                ]
                            }
                        }
                      - Effect    = "Deny"
                      - Resource  = "*"
                      - Sid       = "DenyTagStrip"
                    },
                  - {
                      - Action   = [
                          - "ssm:GetParameter*",
                          - "ssm:GetParametersByPath",
                        ]
                      - Effect   = "Deny"
                      - Resource = [
                          - "arn:aws:ssm:*:*:parameter/javabin/platform/*",
                          - "arn:aws:ssm:*:*:parameter/javabin/slack/*",
                          - "arn:aws:ssm:*:*:parameter/javabin/platform-overrides/*",
                        ]
                      - Sid      = "DenyPlatSSM"
                    },
                  - {
                      - Action      = "iam:PassRole"
                      - Effect      = "Deny"
                      - NotResource = [
                          - "arn:aws:iam::*:role/cake-*",
                          - "arn:aws:iam::*:role/javabin-ecs-exec-cake",
                        ]
                      - Sid         = "DenyPassRole"
                    },
                  - {
                      - Action      = [
                          - "logs:GetLogEvents",
                          - "logs:FilterLogEvents",
                          - "logs:StartQuery",
                          - "logs:GetQueryResults",
                        ]
                      - Effect      = "Deny"
                      - NotResource = [
                          - "arn:aws:logs:*:*:log-group:/ecs/cake/*",
                          - "arn:aws:logs:*:*:log-group:/ecs/cake/*:*",
                        ]
                      - Sid         = "DenyXLogs"
                    },
                  - {
                      - Action   = [
                          - "iam:PutRolePolicy",
                          - "iam:DeleteRolePolicy",
                          - "iam:AttachRolePolicy",
                          - "iam:DetachRolePolicy",
                          - "iam:DeleteRole",
                          - "iam:UpdateRole",
                          - "iam:UpdateAssumeRolePolicy",
                        ]
                      - Effect   = "Deny"
                      - Resource = "arn:aws:iam::553637109631:role/javabin-ci-*"
                      - Sid      = "DenyModCI"
                    },
                  - {
                      - Action    = "ec2:CreateSecurityGroup"
                      - Condition = {
                          - StringNotEqualsIfExists = {
                              - "aws:RequestTag/team" = "cake"
                            }
                        }
                      - Effect    = "Deny"
                      - Resource  = "*"
                      - Sid       = "DenyNoTag"
                    },
                  - {
                      - Action      = [
                          - "s3:CreateBucket",
                          - "dynamodb:CreateTable",
                          - "sqs:CreateQueue",
                          - "sns:CreateTopic",
                          - "rds:CreateDBInstance",
                          - "rds:CreateDBSubnetGroup",
                          - "ecs:CreateService",
                          - "ecs:RegisterTaskDefinition",
                          - "ecr:CreateRepository",
                          - "logs:CreateLogGroup",
                          - "ssm:PutParameter",
                          - "lambda:CreateFunction",
                          - "events:PutRule",
                          - "states:CreateStateMachine",
                        ]
                      - Effect      = "Deny"
                      - NotResource = [
                          - "arn:aws:s3:::cake-*",
                          - "arn:aws:dynamodb:*:*:table/cake-*",
                          - "arn:aws:sqs:*:*:cake-*",
                          - "arn:aws:sns:*:*:cake-*",
                          - "arn:aws:rds:*:*:db:cake-*",
                          - "arn:aws:rds:*:*:subgrp:cake-*",
                          - "arn:aws:ecs:*:*:service/*/cake-*",
                          - "arn:aws:ecs:*:*:task-definition/cake-*:*",
                          - "arn:aws:ecr:*:*:repository/cake-*",
                          - "arn:aws:logs:*:*:log-group:/ecs/cake/*",
                          - "arn:aws:ssm:*:*:parameter/javabin/apps/cake/*",
                          - "arn:aws:lambda:*:*:function:cake-*",
                          - "arn:aws:events:*:*:rule/cake-*",
                          - "arn:aws:states:*:*:stateMachine:cake-*",
                        ]
                      - Sid         = "DenyBadName"
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
      - policy_id        = "ANPAYBZ2X3572ELDCKZ77" -> null
      - tags             = {
          - "Name"     = "javabin-team-cake-guardrails"
          - "for-team" = "cake"
          - "team"     = "shared"
        } -> null
      - tags_all         = {
          - "Name"        = "javabin-team-cake-guardrails"
          - "environment" = "production"
          - "for-team"    = "cake"
          - "managed-by"  = "terraform"
          - "repo"        = "javaBin/platform"
          - "service"     = "platform"
          - "team"        = "shared"
        } -> null
    }

  # module.iam.aws_iam_policy.team_guardrails["commandchimps"] will be destroyed
  # (because key ["commandchimps"] is not in for_each map)
  - resource "aws_iam_policy" "team_guardrails" {
      - arn              = "arn:aws:iam::553637109631:policy/javabin-team-commandchimps-guardrails" -> null
      - attachment_count = 0 -> null
      - description      = "Developer boundary rules for team commandchimps, for its Identity Center permission set" -> null
      - id               = "arn:aws:iam::553637109631:policy/javabin-team-commandchimps-guardrails" -> null
      - name             = "javabin-team-commandchimps-guardrails" -> null
      - path             = "/" -> null
      - policy           = jsonencode(
            {
              - Statement = [
                  - {
                      - Action   = "*"
                      - Effect   = "Allow"
                      - Resource = "*"
                      - Sid      = "Allow"
                    },
                  - {
                      - Action   = [
                          - "iam:DeletePolicy",
                          - "iam:DeletePolicyVersion",
                          - "iam:CreatePolicyVersion",
                          - "iam:SetDefaultPolicyVersion",
                          - "iam:CreatePolicy",
                          - "iam:TagPolicy",
                          - "iam:UntagPolicy",
                        ]
                      - Effect   = "Deny"
                      - Resource = [
                          - "arn:aws:iam::553637109631:policy/javabin-developer-boundary",
                          - "arn:aws:iam::553637109631:policy/javabin-team-*-guardrails",
                        ]
                      - Sid      = "DenyBndMod"
                    },
                  - {
                      - Action    = [
                          - "iam:CreateRole",
                          - "iam:PutRolePermissionsBoundary",
                        ]
                      - Condition = {
                          - StringNotEquals = {
                              - "iam:PermissionsBoundary" = "arn:aws:iam::553637109631:policy/javabin-developer-boundary"
                            }
                        }
                      - Effect    = "Deny"
                      - Resource  = "*"
                      - Sid       = "DenyNoBnd"
                    },
                  - {
                      - Action   = "iam:DeleteRolePermissionsBoundary"
                      - Effect   = "Deny"
                      - Resource = "*"
                      - Sid      = "DenyStripBnd"
                    },
                  - {
                      - Action   = [
                          - "iam:CreateUser",
                          - "iam:CreateLoginProfile",
                          - "iam:UpdateLoginProfile",
                          - "iam:CreateAccessKey",
                          - "iam:DeactivateMFADevice",
                        ]
                      - Effect   = "Deny"
                      - Resource = "*"
                      - Sid      = "DenyIAMUsers"
                    },
                  - {
                      - Action   = [
                          - "organizations:*",
                          - "sso:*",
                          - "sso-directory:*",
                          - "identitystore:*",
                          - "account:*",
                        ]
                      - Effect   = "Deny"
                      - Resource = "*"
                      - Sid      = "DenyOrgSSO"
                    },
                  - {
                      - Action   = [
                          - "ec2:CreateVpc",
                          - "ec2:DeleteVpc",
                          - "ec2:ModifyVpcAttribute",
                          - "ec2:CreateSubnet",
                          - "ec2:DeleteSubnet",
                          - "ec2:CreateInternetGateway",
                          - "ec2:DeleteInternetGateway",
                          - "ec2:AttachInternetGateway",
                          - "ec2:DetachInternetGateway",
                          - "ec2:CreateNatGateway",
                          - "ec2:DeleteNatGateway",
                          - "ec2:CreateRouteTable",
                          - "ec2:DeleteRouteTable",
                        ]
                      - Effect   = "Deny"
                      - Resource = "*"
                      - Sid      = "DenyNetwork"
                    },
                  - {
                      - Action   = [
                          - "ecs:DeleteCluster",
                          - "ecs:UpdateCluster",
                          - "elasticloadbalancing:DeleteLoadBalancer",
                          - "elasticloadbalancing:ModifyLoadBalancerAttributes",
                          - "s3:DeleteBucket",
                          - "s3:PutBucketPolicy",
                          - "s3:DeleteBucketPolicy",
                          - "s3:PutBucketVersioning",
                          - "s3:PutEncryptionConfiguration",
                          - "dynamodb:DeleteTable",
                          - "dynamodb:UpdateTable",
                        ]
                      - Effect   = "Deny"
                      - Resource = [
                          - "arn:aws:ecs:eu-central-1:553637109631:cluster/javabin-platform",
                          - "arn:aws:elasticloadbalancing:eu-central-1:553637109631:loadbalancer/app/javabin-*",
                          - "arn:aws:s3:::javabin-terraform-*",
                          - "arn:aws:s3:::javabin-ci-*",
                          - "arn:aws:dynamodb:eu-central-1:553637109631:table/javabin-terraform-*",
                        ]
                      - Sid      = "DenyPlatInfra"
                    },
                  - {
                      - Action   = [
                          - "guardduty:*",
                          - "securityhub:*",
                          - "config:*",
                          - "cloudtrail:*",
                          - "bedrock:Invoke*",
                          - "bedrock:Converse*",
                        ]
                      - Effect   = "Deny"
                      - Resource = "*"
                      - Sid      = "DenySecSvcs"
                    },
                  - {
                      - Action      = "*"
                      - Condition   = {
                          - Null            = {
                              - "aws:ResourceTag/team" = "false"
                            }
                          - StringNotEquals = {
                              - "aws:ResourceTag/team" = [
                                  - "commandchimps",
                                  - "shared",
                                ]
                            }
                        }
                      - Effect      = "Deny"
                      - NotResource = [
                          - "arn:aws:s3:::javabin-terraform-state-553637109631",
                          - "arn:aws:s3:::javabin-terraform-state-553637109631/*",
                          - "arn:aws:dynamodb:eu-central-1:553637109631:table/javabin-terraform-app-locks",
                          - "arn:aws:s3:::javabin-ci-plan-artifacts-553637109631",
                          - "arn:aws:s3:::javabin-ci-plan-artifacts-553637109631/*",
                        ]
                      - Sid         = "DenyXTeam"
                    },
                  - {
                      - Action    = [
                          - "ec2:Delete*",
                          - "ec2:Modify*",
                          - "elasticloadbalancing:Delete*",
                          - "elasticloadbalancing:Modify*",
                          - "ecs:DeleteCluster",
                          - "ecs:UpdateCluster",
                          - "ecs:UpdateClusterSettings",
                          - "iam:DeleteRole",
                          - "iam:UpdateRole",
                          - "iam:DeleteRolePolicy",
                          - "iam:UpdateAssumeRolePolicy",
                          - "iam:PutRolePolicy",
                          - "iam:AttachRolePolicy",
                          - "iam:DetachRolePolicy",
                          - "route53:DeleteHostedZone",
                          - "sns:DeleteTopic",
                          - "sns:SetTopicAttributes",
                          - "ec2:AuthorizeSecurityGroup*",
                          - "ec2:RevokeSecurityGroup*",
                        ]
                      - Condition = {
                          - StringEquals = {
                              - "aws:ResourceTag/team" = "shared"
                            }
                        }
                      - Effect    = "Deny"
                      - Resource  = "*"
                      - Sid       = "DenyShared"
                    },
                  - {
                      - Action    = [
                          - "ec2:DeleteTags",
                          - "ec2:CreateTags",
                          - "ecs:TagResource",
                          - "ecs:UntagResource",
                          - "elasticloadbalancing:AddTags",
                          - "elasticloadbalancing:RemoveTags",
                          - "iam:TagRole",
                          - "iam:UntagRole",
                          - "sns:TagResource",
                          - "sns:UntagResource",
                        ]
                      - Condition = {
                          - StringEquals = {
                              - "aws:ResourceTag/team" = [
                                  - "shared",
                                  - "platform",
                                ]
                            }
                        }
                      - Effect    = "Deny"
                      - Resource  = "*"
                      - Sid       = "DenyTagStrip"
                    },
                  - {
                      - Action   = [
                          - "ssm:GetParameter*",
                          - "ssm:GetParametersByPath",
                        ]
                      - Effect   = "Deny"
                      - Resource = [
                          - "arn:aws:ssm:*:*:parameter/javabin/platform/*",
                          - "arn:aws:ssm:*:*:parameter/javabin/slack/*",
                          - "arn:aws:ssm:*:*:parameter/javabin/platform-overrides/*",
                        ]
                      - Sid      = "DenyPlatSSM"
                    },
                  - {
                      - Action      = "iam:PassRole"
                      - Effect      = "Deny"
                      - NotResource = [
                          - "arn:aws:iam::*:role/commandchimps-*",
                          - "arn:aws:iam::*:role/javabin-ecs-exec-commandchimps",
                        ]
                      - Sid         = "DenyPassRole"
                    },
                  - {
                      - Action      = [
                          - "logs:GetLogEvents",
                          - "logs:FilterLogEvents",
                          - "logs:StartQuery",
                          - "logs:GetQueryResults",
                        ]
                      - Effect      = "Deny"
                      - NotResource = [
                          - "arn:aws:logs:*:*:log-group:/ecs/commandchimps/*",
                          - "arn:aws:logs:*:*:log-group:/ecs/commandchimps/*:*",
                        ]
                      - Sid         = "DenyXLogs"
                    },
                  - {
                      - Action   = [
                          - "iam:PutRolePolicy",
                          - "iam:DeleteRolePolicy",
                          - "iam:AttachRolePolicy",
                          - "iam:DetachRolePolicy",
                          - "iam:DeleteRole",
                          - "iam:UpdateRole",
                          - "iam:UpdateAssumeRolePolicy",
                        ]
                      - Effect   = "Deny"
                      - Resource = "arn:aws:iam::553637109631:role/javabin-ci-*"
                      - Sid      = "DenyModCI"
                    },
                  - {
                      - Action    = "ec2:CreateSecurityGroup"
                      - Condition = {
                          - StringNotEqualsIfExists = {
                              - "aws:RequestTag/team" = "commandchimps"
                            }
                        }
                      - Effect    = "Deny"
                      - Resource  = "*"
                      - Sid       = "DenyNoTag"
                    },
                  - {
                      - Action      = [
                          - "s3:CreateBucket",
                          - "dynamodb:CreateTable",
                          - "sqs:CreateQueue",
                          - "sns:CreateTopic",
                          - "rds:CreateDBInstance",
                          - "rds:CreateDBSubnetGroup",
                          - "ecs:CreateService",
                          - "ecs:RegisterTaskDefinition",
                          - "ecr:CreateRepository",
                          - "logs:CreateLogGroup",
                          - "ssm:PutParameter",
                          - "lambda:CreateFunction",
                          - "events:PutRule",
                          - "states:CreateStateMachine",
                        ]
                      - Effect      = "Deny"
                      - NotResource = [
                          - "arn:aws:s3:::commandchimps-*",
                          - "arn:aws:dynamodb:*:*:table/commandchimps-*",
                          - "arn:aws:sqs:*:*:commandchimps-*",
                          - "arn:aws:sns:*:*:commandchimps-*",
                          - "arn:aws:rds:*:*:db:commandchimps-*",
                          - "arn:aws:rds:*:*:subgrp:commandchimps-*",
                          - "arn:aws:ecs:*:*:service/*/commandchimps-*",
                          - "arn:aws:ecs:*:*:task-definition/commandchimps-*:*",
                          - "arn:aws:ecr:*:*:repository/commandchimps-*",
                          - "arn:aws:logs:*:*:log-group:/ecs/commandchimps/*",
                          - "arn:aws:ssm:*:*:parameter/javabin/apps/commandchimps/*",
                          - "arn:aws:lambda:*:*:function:commandchimps-*",
                          - "arn:aws:events:*:*:rule/commandchimps-*",
                          - "arn:aws:states:*:*:stateMachine:commandchimps-*",
                        ]
                      - Sid         = "DenyBadName"
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
      - policy_id        = "ANPAYBZ2X3576APVBTR3N" -> null
      - tags             = {
          - "Name"     = "javabin-team-commandchimps-guardrails"
          - "for-team" = "commandchimps"
          - "team"     = "shared"
        } -> null
      - tags_all         = {
          - "Name"        = "javabin-team-commandchimps-guardrails"
          - "environment" = "production"
          - "for-team"    = "commandchimps"
          - "managed-by"  = "terraform"
          - "repo"        = "javaBin/platform"
          - "service"     = "platform"
          - "team"        = "shared"
        } -> null
    }

  # module.iam.aws_iam_policy.team_guardrails["developer"] will be destroyed
  # (because key ["developer"] is not in for_each map)
  - resource "aws_iam_policy" "team_guardrails" {
      - arn              = "arn:aws:iam::553637109631:policy/javabin-team-developer-guardrails" -> null
      - attachment_count = 0 -> null
      - description      = "Developer boundary rules for team developer, for its Identity Center permission set" -> null
      - id               = "arn:aws:iam::553637109631:policy/javabin-team-developer-guardrails" -> null
      - name             = "javabin-team-developer-guardrails" -> null
      - path             = "/" -> null
      - policy           = jsonencode(
            {
              - Statement = [
                  - {
                      - Action   = "*"
                      - Effect   = "Allow"
                      - Resource = "*"
                      - Sid      = "Allow"
                    },
                  - {
                      - Action   = [
                          - "iam:DeletePolicy",
                          - "iam:DeletePolicyVersion",
                          - "iam:CreatePolicyVersion",
                          - "iam:SetDefaultPolicyVersion",
                          - "iam:CreatePolicy",
                          - "iam:TagPolicy",
                          - "iam:UntagPolicy",
                        ]
                      - Effect   = "Deny"
                      - Resource = [
                          - "arn:aws:iam::553637109631:policy/javabin-developer-boundary",
                          - "arn:aws:iam::553637109631:policy/javabin-team-*-guardrails",
                        ]
                      - Sid      = "DenyBndMod"
                    },
                  - {
                      - Action    = [
                          - "iam:CreateRole",
                          - "iam:PutRolePermissionsBoundary",
                        ]
                      - Condition = {
                          - StringNotEquals = {
                              - "iam:PermissionsBoundary" = "arn:aws:iam::553637109631:policy/javabin-developer-boundary"
                            }
                        }
                      - Effect    = "Deny"
                      - Resource  = "*"
                      - Sid       = "DenyNoBnd"
                    },
                  - {
                      - Action   = "iam:DeleteRolePermissionsBoundary"
                      - Effect   = "Deny"
                      - Resource = "*"
                      - Sid      = "DenyStripBnd"
                    },
                  - {
                      - Action   = [
                          - "iam:CreateUser",
                          - "iam:CreateLoginProfile",
                          - "iam:UpdateLoginProfile",
                          - "iam:CreateAccessKey",
                          - "iam:DeactivateMFADevice",
                        ]
                      - Effect   = "Deny"
                      - Resource = "*"
                      - Sid      = "DenyIAMUsers"
                    },
                  - {
                      - Action   = [
                          - "organizations:*",
                          - "sso:*",
                          - "sso-directory:*",
                          - "identitystore:*",
                          - "account:*",
                        ]
                      - Effect   = "Deny"
                      - Resource = "*"
                      - Sid      = "DenyOrgSSO"
                    },
                  - {
                      - Action   = [
                          - "ec2:CreateVpc",
                          - "ec2:DeleteVpc",
                          - "ec2:ModifyVpcAttribute",
                          - "ec2:CreateSubnet",
                          - "ec2:DeleteSubnet",
                          - "ec2:CreateInternetGateway",
                          - "ec2:DeleteInternetGateway",
                          - "ec2:AttachInternetGateway",
                          - "ec2:DetachInternetGateway",
                          - "ec2:CreateNatGateway",
                          - "ec2:DeleteNatGateway",
                          - "ec2:CreateRouteTable",
                          - "ec2:DeleteRouteTable",
                        ]
                      - Effect   = "Deny"
                      - Resource = "*"
                      - Sid      = "DenyNetwork"
                    },
                  - {
                      - Action   = [
                          - "ecs:DeleteCluster",
                          - "ecs:UpdateCluster",
                          - "elasticloadbalancing:DeleteLoadBalancer",
                          - "elasticloadbalancing:ModifyLoadBalancerAttributes",
                          - "s3:DeleteBucket",
                          - "s3:PutBucketPolicy",
                          - "s3:DeleteBucketPolicy",
                          - "s3:PutBucketVersioning",
                          - "s3:PutEncryptionConfiguration",
                          - "dynamodb:DeleteTable",
                          - "dynamodb:UpdateTable",
                        ]
                      - Effect   = "Deny"
                      - Resource = [
                          - "arn:aws:ecs:eu-central-1:553637109631:cluster/javabin-platform",
                          - "arn:aws:elasticloadbalancing:eu-central-1:553637109631:loadbalancer/app/javabin-*",
                          - "arn:aws:s3:::javabin-terraform-*",
                          - "arn:aws:s3:::javabin-ci-*",
                          - "arn:aws:dynamodb:eu-central-1:553637109631:table/javabin-terraform-*",
                        ]
                      - Sid      = "DenyPlatInfra"
                    },
                  - {
                      - Action   = [
                          - "guardduty:*",
                          - "securityhub:*",
                          - "config:*",
                          - "cloudtrail:*",
                          - "bedrock:Invoke*",
                          - "bedrock:Converse*",
                        ]
                      - Effect   = "Deny"
                      - Resource = "*"
                      - Sid      = "DenySecSvcs"
                    },
                  - {
                      - Action      = "*"
                      - Condition   = {
                          - Null            = {
                              - "aws:ResourceTag/team" = "false"
                            }
                          - StringNotEquals = {
                              - "aws:ResourceTag/team" = [
                                  - "developer",
                                  - "shared",
                                ]
                            }
                        }
                      - Effect      = "Deny"
                      - NotResource = [
                          - "arn:aws:s3:::javabin-terraform-state-553637109631",
                          - "arn:aws:s3:::javabin-terraform-state-553637109631/*",
                          - "arn:aws:dynamodb:eu-central-1:553637109631:table/javabin-terraform-app-locks",
                          - "arn:aws:s3:::javabin-ci-plan-artifacts-553637109631",
                          - "arn:aws:s3:::javabin-ci-plan-artifacts-553637109631/*",
                        ]
                      - Sid         = "DenyXTeam"
                    },
                  - {
                      - Action    = [
                          - "ec2:Delete*",
                          - "ec2:Modify*",
                          - "elasticloadbalancing:Delete*",
                          - "elasticloadbalancing:Modify*",
                          - "ecs:DeleteCluster",
                          - "ecs:UpdateCluster",
                          - "ecs:UpdateClusterSettings",
                          - "iam:DeleteRole",
                          - "iam:UpdateRole",
                          - "iam:DeleteRolePolicy",
                          - "iam:UpdateAssumeRolePolicy",
                          - "iam:PutRolePolicy",
                          - "iam:AttachRolePolicy",
                          - "iam:DetachRolePolicy",
                          - "route53:DeleteHostedZone",
                          - "sns:DeleteTopic",
                          - "sns:SetTopicAttributes",
                          - "ec2:AuthorizeSecurityGroup*",
                          - "ec2:RevokeSecurityGroup*",
                        ]
                      - Condition = {
                          - StringEquals = {
                              - "aws:ResourceTag/team" = "shared"
                            }
                        }
                      - Effect    = "Deny"
                      - Resource  = "*"
                      - Sid       = "DenyShared"
                    },
                  - {
                      - Action    = [
                          - "ec2:DeleteTags",
                          - "ec2:CreateTags",
                          - "ecs:TagResource",
                          - "ecs:UntagResource",
                          - "elasticloadbalancing:AddTags",
                          - "elasticloadbalancing:RemoveTags",
                          - "iam:TagRole",
                          - "iam:UntagRole",
                          - "sns:TagResource",
                          - "sns:UntagResource",
                        ]
                      - Condition = {
                          - StringEquals = {
                              - "aws:ResourceTag/team" = [
                                  - "shared",
                                  - "platform",
                                ]
                            }
                        }
                      - Effect    = "Deny"
                      - Resource  = "*"
                      - Sid       = "DenyTagStrip"
                    },
                  - {
                      - Action   = [
                          - "ssm:GetParameter*",
                          - "ssm:GetParametersByPath",
                        ]
                      - Effect   = "Deny"
                      - Resource = [
                          - "arn:aws:ssm:*:*:parameter/javabin/platform/*",
                          - "arn:aws:ssm:*:*:parameter/javabin/slack/*",
                          - "arn:aws:ssm:*:*:parameter/javabin/platform-overrides/*",
                        ]
                      - Sid      = "DenyPlatSSM"
                    },
                  - {
                      - Action      = "iam:PassRole"
                      - Effect      = "Deny"
                      - NotResource = [
                          - "arn:aws:iam::*:role/developer-*",
                          - "arn:aws:iam::*:role/javabin-ecs-exec-developer",
                        ]
                      - Sid         = "DenyPassRole"
                    },
                  - {
                      - Action      = [
                          - "logs:GetLogEvents",
                          - "logs:FilterLogEvents",
                          - "logs:StartQuery",
                          - "logs:GetQueryResults",
                        ]
                      - Effect      = "Deny"
                      - NotResource = [
                          - "arn:aws:logs:*:*:log-group:/ecs/developer/*",
                          - "arn:aws:logs:*:*:log-group:/ecs/developer/*:*",
                        ]
                      - Sid         = "DenyXLogs"
                    },
                  - {
                      - Action   = [
                          - "iam:PutRolePolicy",
                          - "iam:DeleteRolePolicy",
                          - "iam:AttachRolePolicy",
                          - "iam:DetachRolePolicy",
                          - "iam:DeleteRole",
                          - "iam:UpdateRole",
                          - "iam:UpdateAssumeRolePolicy",
                        ]
                      - Effect   = "Deny"
                      - Resource = "arn:aws:iam::553637109631:role/javabin-ci-*"
                      - Sid      = "DenyModCI"
                    },
                  - {
                      - Action    = "ec2:CreateSecurityGroup"
                      - Condition = {
                          - StringNotEqualsIfExists = {
                              - "aws:RequestTag/team" = "developer"
                            }
                        }
                      - Effect    = "Deny"
                      - Resource  = "*"
                      - Sid       = "DenyNoTag"
                    },
                  - {
                      - Action      = [
                          - "s3:CreateBucket",
                          - "dynamodb:CreateTable",
                          - "sqs:CreateQueue",
                          - "sns:CreateTopic",
                          - "rds:CreateDBInstance",
                          - "rds:CreateDBSubnetGroup",
                          - "ecs:CreateService",
                          - "ecs:RegisterTaskDefinition",
                          - "ecr:CreateRepository",
                          - "logs:CreateLogGroup",
                          - "ssm:PutParameter",
                          - "lambda:CreateFunction",
                          - "events:PutRule",
                          - "states:CreateStateMachine",
                        ]
                      - Effect      = "Deny"
                      - NotResource = [
                          - "arn:aws:s3:::developer-*",
                          - "arn:aws:dynamodb:*:*:table/developer-*",
                          - "arn:aws:sqs:*:*:developer-*",
                          - "arn:aws:sns:*:*:developer-*",
                          - "arn:aws:rds:*:*:db:developer-*",
                          - "arn:aws:rds:*:*:subgrp:developer-*",
                          - "arn:aws:ecs:*:*:service/*/developer-*",
                          - "arn:aws:ecs:*:*:task-definition/developer-*:*",
                          - "arn:aws:ecr:*:*:repository/developer-*",
                          - "arn:aws:logs:*:*:log-group:/ecs/developer/*",
                          - "arn:aws:ssm:*:*:parameter/javabin/apps/developer/*",
                          - "arn:aws:lambda:*:*:function:developer-*",
                          - "arn:aws:events:*:*:rule/developer-*",
                          - "arn:aws:states:*:*:stateMachine:developer-*",
                        ]
                      - Sid         = "DenyBadName"
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
      - policy_id        = "ANPAYBZ2X357YOHVAQJAF" -> null
      - tags             = {
          - "Name"     = "javabin-team-developer-guardrails"
          - "for-team" = "developer"
          - "team"     = "shared"
        } -> null
      - tags_all         = {
          - "Name"        = "javabin-team-developer-guardrails"
          - "environment" = "production"
          - "for-team"    = "developer"
          - "managed-by"  = "terraform"
          - "repo"        = "javaBin/platform"
          - "service"     = "platform"
          - "team"        = "shared"
        } -> null
    }

  # module.iam.aws_iam_policy.team_guardrails["java-no"] will be destroyed
  # (because key ["java-no"] is not in for_each map)
  - resource "aws_iam_policy" "team_guardrails" {
      - arn              = "arn:aws:iam::553637109631:policy/javabin-team-java-no-guardrails" -> null
      - attachment_count = 0 -> null
      - description      = "Developer boundary rules for team java-no, for its Identity Center permission set" -> null
      - id               = "arn:aws:iam::553637109631:policy/javabin-team-java-no-guardrails" -> null
      - name             = "javabin-team-java-no-guardrails" -> null
      - path             = "/" -> null
      - policy           = jsonencode(
            {
              - Statement = [
                  - {
                      - Action   = "*"
                      - Effect   = "Allow"
                      - Resource = "*"
                      - Sid      = "Allow"
                    },
                  - {
                      - Action   = [
                          - "iam:DeletePolicy",
                          - "iam:DeletePolicyVersion",
                          - "iam:CreatePolicyVersion",
                          - "iam:SetDefaultPolicyVersion",
                          - "iam:CreatePolicy",
                          - "iam:TagPolicy",
                          - "iam:UntagPolicy",
                        ]
                      - Effect   = "Deny"
                      - Resource = [
                          - "arn:aws:iam::553637109631:policy/javabin-developer-boundary",
                          - "arn:aws:iam::553637109631:policy/javabin-team-*-guardrails",
                        ]
                      - Sid      = "DenyBndMod"
                    },
                  - {
                      - Action    = [
                          - "iam:CreateRole",
                          - "iam:PutRolePermissionsBoundary",
                        ]
                      - Condition = {
                          - StringNotEquals = {
                              - "iam:PermissionsBoundary" = "arn:aws:iam::553637109631:policy/javabin-developer-boundary"
                            }
                        }
                      - Effect    = "Deny"
                      - Resource  = "*"
                      - Sid       = "DenyNoBnd"
                    },
                  - {
                      - Action   = "iam:DeleteRolePermissionsBoundary"
                      - Effect   = "Deny"
                      - Resource = "*"
                      - Sid      = "DenyStripBnd"
                    },
                  - {
                      - Action   = [
                          - "iam:CreateUser",
                          - "iam:CreateLoginProfile",
                          - "iam:UpdateLoginProfile",
                          - "iam:CreateAccessKey",
                          - "iam:DeactivateMFADevice",
                        ]
                      - Effect   = "Deny"
                      - Resource = "*"
                      - Sid      = "DenyIAMUsers"
                    },
                  - {
                      - Action   = [
                          - "organizations:*",
                          - "sso:*",
                          - "sso-directory:*",
                          - "identitystore:*",
                          - "account:*",
                        ]
                      - Effect   = "Deny"
                      - Resource = "*"
                      - Sid      = "DenyOrgSSO"
                    },
                  - {
                      - Action   = [
                          - "ec2:CreateVpc",
                          - "ec2:DeleteVpc",
                          - "ec2:ModifyVpcAttribute",
                          - "ec2:CreateSubnet",
                          - "ec2:DeleteSubnet",
                          - "ec2:CreateInternetGateway",
                          - "ec2:DeleteInternetGateway",
                          - "ec2:AttachInternetGateway",
                          - "ec2:DetachInternetGateway",
                          - "ec2:CreateNatGateway",
                          - "ec2:DeleteNatGateway",
                          - "ec2:CreateRouteTable",
                          - "ec2:DeleteRouteTable",
                        ]
                      - Effect   = "Deny"
                      - Resource = "*"
                      - Sid      = "DenyNetwork"
                    },
                  - {
                      - Action   = [
                          - "ecs:DeleteCluster",
                          - "ecs:UpdateCluster",
                          - "elasticloadbalancing:DeleteLoadBalancer",
                          - "elasticloadbalancing:ModifyLoadBalancerAttributes",
                          - "s3:DeleteBucket",
                          - "s3:PutBucketPolicy",
                          - "s3:DeleteBucketPolicy",
                          - "s3:PutBucketVersioning",
                          - "s3:PutEncryptionConfiguration",
                          - "dynamodb:DeleteTable",
                          - "dynamodb:UpdateTable",
                        ]
                      - Effect   = "Deny"
                      - Resource = [
                          - "arn:aws:ecs:eu-central-1:553637109631:cluster/javabin-platform",
                          - "arn:aws:elasticloadbalancing:eu-central-1:553637109631:loadbalancer/app/javabin-*",
                          - "arn:aws:s3:::javabin-terraform-*",
                          - "arn:aws:s3:::javabin-ci-*",
                          - "arn:aws:dynamodb:eu-central-1:553637109631:table/javabin-terraform-*",
                        ]
                      - Sid      = "DenyPlatInfra"
                    },
                  - {
                      - Action   = [
                          - "guardduty:*",
                          - "securityhub:*",
                          - "config:*",
                          - "cloudtrail:*",
                          - "bedrock:Invoke*",
                          - "bedrock:Converse*",
                        ]
                      - Effect   = "Deny"
                      - Resource = "*"
                      - Sid      = "DenySecSvcs"
                    },
                  - {
                      - Action      = "*"
                      - Condition   = {
                          - Null            = {
                              - "aws:ResourceTag/team" = "false"
                            }
                          - StringNotEquals = {
                              - "aws:ResourceTag/team" = [
                                  - "java-no",
                                  - "shared",
                                ]
                            }
                        }
                      - Effect      = "Deny"
                      - NotResource = [
                          - "arn:aws:s3:::javabin-terraform-state-553637109631",
                          - "arn:aws:s3:::javabin-terraform-state-553637109631/*",
                          - "arn:aws:dynamodb:eu-central-1:553637109631:table/javabin-terraform-app-locks",
                          - "arn:aws:s3:::javabin-ci-plan-artifacts-553637109631",
                          - "arn:aws:s3:::javabin-ci-plan-artifacts-553637109631/*",
                        ]
                      - Sid         = "DenyXTeam"
                    },
                  - {
                      - Action    = [
                          - "ec2:Delete*",
                          - "ec2:Modify*",
                          - "elasticloadbalancing:Delete*",
                          - "elasticloadbalancing:Modify*",
                          - "ecs:DeleteCluster",
                          - "ecs:UpdateCluster",
                          - "ecs:UpdateClusterSettings",
                          - "iam:DeleteRole",
                          - "iam:UpdateRole",
                          - "iam:DeleteRolePolicy",
                          - "iam:UpdateAssumeRolePolicy",
                          - "iam:PutRolePolicy",
                          - "iam:AttachRolePolicy",
                          - "iam:DetachRolePolicy",
                          - "route53:DeleteHostedZone",
                          - "sns:DeleteTopic",
                          - "sns:SetTopicAttributes",
                          - "ec2:AuthorizeSecurityGroup*",
                          - "ec2:RevokeSecurityGroup*",
                        ]
                      - Condition = {
                          - StringEquals = {
                              - "aws:ResourceTag/team" = "shared"
                            }
                        }
                      - Effect    = "Deny"
                      - Resource  = "*"
                      - Sid       = "DenyShared"
                    },
                  - {
                      - Action    = [
                          - "ec2:DeleteTags",
                          - "ec2:CreateTags",
                          - "ecs:TagResource",
                          - "ecs:UntagResource",
                          - "elasticloadbalancing:AddTags",
                          - "elasticloadbalancing:RemoveTags",
                          - "iam:TagRole",
                          - "iam:UntagRole",
                          - "sns:TagResource",
                          - "sns:UntagResource",
                        ]
                      - Condition = {
                          - StringEquals = {
                              - "aws:ResourceTag/team" = [
                                  - "shared",
                                  - "platform",
                                ]
                            }
                        }
                      - Effect    = "Deny"
                      - Resource  = "*"
                      - Sid       = "DenyTagStrip"
                    },
                  - {
                      - Action   = [
                          - "ssm:GetParameter*",
                          - "ssm:GetParametersByPath",
                        ]
                      - Effect   = "Deny"
                      - Resource = [
                          - "arn:aws:ssm:*:*:parameter/javabin/platform/*",
                          - "arn:aws:ssm:*:*:parameter/javabin/slack/*",
                          - "arn:aws:ssm:*:*:parameter/javabin/platform-overrides/*",
                        ]
                      - Sid      = "DenyPlatSSM"
                    },
                  - {
                      - Action      = "iam:PassRole"
                      - Effect      = "Deny"
                      - NotResource = [
                          - "arn:aws:iam::*:role/java-no-*",
                          - "arn:aws:iam::*:role/javabin-ecs-exec-java-no",
                        ]
                      - Sid         = "DenyPassRole"
                    },
                  - {
                      - Action      = [
                          - "logs:GetLogEvents",
                          - "logs:FilterLogEvents",
                          - "logs:StartQuery",
                          - "logs:GetQueryResults",
                        ]
                      - Effect      = "Deny"
                      - NotResource = [
                          - "arn:aws:logs:*:*:log-group:/ecs/java-no/*",
                          - "arn:aws:logs:*:*:log-group:/ecs/java-no/*:*",
                        ]
                      - Sid         = "DenyXLogs"
                    },
                  - {
                      - Action   = [
                          - "iam:PutRolePolicy",
                          - "iam:DeleteRolePolicy",
                          - "iam:AttachRolePolicy",
                          - "iam:DetachRolePolicy",
                          - "iam:DeleteRole",
                          - "iam:UpdateRole",
                          - "iam:UpdateAssumeRolePolicy",
                        ]
                      - Effect   = "Deny"
                      - Resource = "arn:aws:iam::553637109631:role/javabin-ci-*"
                      - Sid      = "DenyModCI"
                    },
                  - {
                      - Action    = "ec2:CreateSecurityGroup"
                      - Condition = {
                          - StringNotEqualsIfExists = {
                              - "aws:RequestTag/team" = "java-no"
                            }
                        }
                      - Effect    = "Deny"
                      - Resource  = "*"
                      - Sid       = "DenyNoTag"
                    },
                  - {
                      - Action      = [
                          - "s3:CreateBucket",
                          - "dynamodb:CreateTable",
                          - "sqs:CreateQueue",
                          - "sns:CreateTopic",
                          - "rds:CreateDBInstance",
                          - "rds:CreateDBSubnetGroup",
                          - "ecs:CreateService",
                          - "ecs:RegisterTaskDefinition",
                          - "ecr:CreateRepository",
                          - "logs:CreateLogGroup",
                          - "ssm:PutParameter",
                          - "lambda:CreateFunction",
                          - "events:PutRule",
                          - "states:CreateStateMachine",
                        ]
                      - Effect      = "Deny"
                      - NotResource = [
                          - "arn:aws:s3:::java-no-*",
                          - "arn:aws:dynamodb:*

LLM Review

Risk: 🔴 HIGH

Plan destroys 231 IAM resources (20 team guardrail policies, CI deploy and ECS exec roles and their inline policies/attachments) and updates 2 resources (a Lambda and its password_set policy) with 0 additions; the 205 resources after the first 28 shown in the diff were not reviewed in full, only judged by address and action, so this HIGH rating is driven by the scale of the IAM teardown.

  • 💥 [destruction] All 231 destroys are keyed 'not in for_each map', meaning the team keys (cake, commandchimps, developer, java-no, javazone-no, javazone-work, owners, partnermanagement, team-apps, team-cibus, team-cibus2, team-ems, team-incogito, team-javazone-badge, team-javazone-video, team-jz-text-adventure, team-portal, team-scala-training-code, team-submitit, teammoosehead, teamteknologihuset) have been removed from the module input, likely by a variable or map change. Nothing is added to replace them. This looks like an accidental wipe of the team IAM setup rather than an intended decommission, and should be confirmed before apply.
  • 💥 [destruction] The destroyed ci_deploy roles (javabin-ci-deploy-) are assumed via javabin-ci-broker. Deleting them and their inline policies breaks CI/CD deploy paths for every team at once, and their ECS exec roles (javabin-ecs-exec-) are removed too, which can stop running ECS tasks from pulling secrets or logging.
  • 🔒 [security] The destroyed team_guardrails policies are the permission boundary for the developer-facing roles (javabin-developer-boundary is referenced by the guardrails). Removing the guardrail policies and roles simultaneously changes the IAM permission surface for every team's Identity Center permission set. Verify that the Identity Center side and the developer boundary policy are not also affected. Note that the guardrail policies contain Allow '*' statements scoped by Deny conditions; I did not verify whether these policies are still attached anywhere after the change.
  • 🔒 [security] The diff shown only covers the first 28 changes. Diff details for the 205 role, policy, attachment and inline-policy destroys, plus the two in-place updates (module.lambdas.aws_iam_role_policy.password_set and module.lambdas.aws_lambda_function.team_provisioner), were not reviewed, so the content of those changes is unknown. The Lambda update and the password_set policy change should be reviewed separately, since they may touch the team provisioner's permissions.
  • 💰 [cost] No billable resources are added (0 to add). Destroying these IAM resources carries no direct cost, and there are no NAT gateways, load balancers or RDS instances in the visible changes.
  • ✅ [routine] Plan output was truncated at 8136 of 18988 lines and the plan itself exceeds the 400,000-character review limit, so this review is incomplete. Run the plan again with the team map intact, or split it into smaller plans, before approving.

@Alexanderamiri
Alexanderamiri merged commit d9add7a into main Oct 24, 2026
4 checks passed
@Alexanderamiri
Alexanderamiri deleted the feat/atlassian-all-accounts branch October 24, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant