LimitExceeded: Cannot exceed quota for ACLSizePerRole: 2048 #66
-
Hi, I'm finalizing the identity layer following https://docs.cloudposse.com/layers/identity, running OpenTofu used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
~ update in-place
OpenTofu will perform the following actions:
# aws_iam_role.default["qh-core-gbl-root-tfstate"] will be updated in-place
~ resource "aws_iam_role" "default" {
~ assume_role_policy = jsonencode(
~ {
~ Statement = [
~ {
~ Condition = {
~ ArnLike = {
~ "aws:PrincipalArn" = "arn:aws:iam::324037278566:user/SuperAdmin" -> [
+ "arn:aws:iam::218289152745:role/qh-core-gbl-identity-developers",
+ "arn:aws:iam::218289152745:role/qh-core-gbl-identity-devops",
+ "arn:aws:iam::218289152745:role/qh-core-gbl-identity-gitops",
+ "arn:aws:iam::218289152745:role/qh-core-gbl-identity-managers",
+ "arn:aws:iam::218289152745:role/qh-core-gbl-identity-planners",
+ "arn:aws:iam::324037278566:role/qh-core-gbl-root-admin",
+ "arn:aws:iam::218289152745:role/aws-reserved/sso.amazonaws.com*/AWSReservedSSO_IdentityDevelopersTeamAccess_*",
+ "arn:aws:iam::218289152745:role/aws-reserved/sso.amazonaws.com*/AWSReservedSSO_IdentityDevopsTeamAccess_*",
+ "arn:aws:iam::218289152745:role/aws-reserved/sso.amazonaws.com*/AWSReservedSSO_IdentityManagersTeamAccess_*",
+ "arn:aws:iam::218289152745:role/aws-reserved/sso.amazonaws.com*/AWSReservedSSO_AdministratorAccess_*",
+ "arn:aws:iam::218289152745:role/aws-reserved/sso.amazonaws.com*/AWSReservedSSO_IdentityPlannersTeamAccess_*",
+ "arn:aws:iam::218289152745:role/aws-reserved/sso.amazonaws.com*/AWSReservedSSO_IdentityGitopsTeamAccess_*",
+ "arn:aws:iam::324037278566:role/aws-reserved/sso.amazonaws.com*/AWSReservedSSO_TerraformUpdateAccess_*",
]
}
+ StringEquals = {
+ "aws:PrincipalType" = "AssumedRole"
}
}
~ Principal = {
~ AWS = "arn:aws:iam::324037278566:root" -> [
+ "arn:aws:iam::324037278566:root",
+ "arn:aws:iam::218289152745:root",
]
}
~ Sid = "ColdStartRoleAssumeRole" -> "RoleAssumeRole"
# (2 unchanged attributes hidden)
},
+ {
+ Action = [
+ "sts:TagSession",
+ "sts:SetSourceIdentity",
+ "sts:AssumeRole",
]
+ Condition = {
+ ArnLike = {
+ "aws:PrincipalArn" = "arn:aws:iam::324037278566:user/SuperAdmin"
}
}
+ Effect = "Allow"
+ Principal = {
+ AWS = "arn:aws:iam::324037278566:root"
}
+ Sid = "PrincipalAssumeRole"
},
+ {
+ Action = [
+ "sts:TagSession",
+ "sts:SetSourceIdentity",
+ "sts:AssumeRole",
]
+ Condition = {
+ ArnLike = {
+ "aws:PrincipalArn" = "arn:aws:iam::*:user/*"
}
+ ArnNotEquals = {
+ "aws:PrincipalArn" = "arn:aws:iam::324037278566:user/SuperAdmin"
}
}
+ Effect = "Deny"
+ Principal = {
+ AWS = [
+ "arn:aws:iam::324037278566:root",
+ "arn:aws:iam::218289152745:root",
]
}
+ Sid = "RoleDenyAssumeRole"
},
]
# (1 unchanged attribute hidden)
}
)
id = "qh-core-gbl-root-tfstate"
name = "qh-core-gbl-root-tfstate"
tags = {
"Environment" = "use1"
"Name" = "qh-core-gbl-root-tfstate"
"Namespace" = "qh"
"Stage" = "root"
"Tenant" = "core"
}
# (9 unchanged attributes hidden)
# (1 unchanged block hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
aws_iam_role.default["qh-core-gbl-root-tfstate"]: Modifying... [id=qh-core-gbl-root-tfstate]
╷
│ Error: updating IAM Role (qh-core-gbl-root-tfstate) assume role policy: operation error IAM: UpdateAssumeRolePolicy, https response error StatusCode: 409, RequestID: 423b95b7-2cf1-4d2e-8dd2-537cb88b2022, LimitExceeded: Cannot exceed quota for ACLSizePerRole: 2048
│
│ with aws_iam_role.default["qh-core-gbl-root-tfstate"],
│ on iam.tf line 81, in resource "aws_iam_role" "default":
│ 81: resource "aws_iam_role" "default" {
│
╵
Error
exit status 1
Error
|
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
This is due to a default ACL size limit for AWS. You could put in a request for a larger size limit, or comment out (or remove) the following. The additional allowed roles are to handle edge use cases, that you may not need at this time. Here are all places that may exceed the default quota for
|
Beta Was this translation helpful? Give feedback.
-
Thanks. |
Beta Was this translation helpful? Give feedback.
-
Chopped as suggested, but still the same error: # aws_iam_role.default["qh-core-gbl-root-tfstate"] will be updated in-place
~ resource "aws_iam_role" "default" {
~ assume_role_policy = jsonencode(
~ {
~ Statement = [
~ {
~ Condition = {
~ ArnLike = {
~ "aws:PrincipalArn" = "arn:aws:iam::324037278566:user/SuperAdmin" -> [
+ "arn:aws:iam::218289152745:role/qh-core-gbl-identity-developers",
+ "arn:aws:iam::218289152745:role/qh-core-gbl-identity-devops",
+ "arn:aws:iam::218289152745:role/qh-core-gbl-identity-gitops",
+ "arn:aws:iam::218289152745:role/qh-core-gbl-identity-managers",
+ "arn:aws:iam::218289152745:role/qh-core-gbl-identity-planners",
+ "arn:aws:iam::324037278566:role/qh-core-gbl-root-admin",
+ "arn:aws:iam::218289152745:role/aws-reserved/sso.amazonaws.com*/AWSReservedSSO_IdentityDevelopersTeamAccess_*",
+ "arn:aws:iam::218289152745:role/aws-reserved/sso.amazonaws.com*/AWSReservedSSO_IdentityDevopsTeamAccess_*",
+ "arn:aws:iam::218289152745:role/aws-reserved/sso.amazonaws.com*/AWSReservedSSO_IdentityManagersTeamAccess_*",
+ "arn:aws:iam::218289152745:role/aws-reserved/sso.amazonaws.com*/AWSReservedSSO_AdministratorAccess_*",
+ "arn:aws:iam::218289152745:role/aws-reserved/sso.amazonaws.com*/AWSReservedSSO_IdentityPlannersTeamAccess_*",
+ "arn:aws:iam::218289152745:role/aws-reserved/sso.amazonaws.com*/AWSReservedSSO_IdentityGitopsTeamAccess_*",
+ "arn:aws:iam::324037278566:role/aws-reserved/sso.amazonaws.com*/AWSReservedSSO_TerraformUpdateAccess_*",
]
}
+ StringEquals = {
+ "aws:PrincipalType" = "AssumedRole"
}
}
~ Principal = {
~ AWS = "arn:aws:iam::324037278566:root" -> [
+ "arn:aws:iam::324037278566:root",
+ "arn:aws:iam::218289152745:root",
]
}
~ Sid = "ColdStartRoleAssumeRole" -> "RoleAssumeRole"
# (2 unchanged attributes hidden)
},
+ {
+ Action = [
+ "sts:TagSession",
+ "sts:SetSourceIdentity",
+ "sts:AssumeRole",
]
+ Condition = {
+ ArnLike = {
+ "aws:PrincipalArn" = "arn:aws:iam::324037278566:user/SuperAdmin"
}
}
+ Effect = "Allow"
+ Principal = {
+ AWS = "arn:aws:iam::324037278566:root"
}
+ Sid = "PrincipalAssumeRole"
},
+ {
+ Action = [
+ "sts:TagSession",
+ "sts:SetSourceIdentity",
+ "sts:AssumeRole",
]
+ Condition = {
+ ArnLike = {
+ "aws:PrincipalArn" = "arn:aws:iam::*:user/*"
}
+ ArnNotEquals = {
+ "aws:PrincipalArn" = "arn:aws:iam::324037278566:user/SuperAdmin"
}
}
+ Effect = "Deny"
+ Principal = {
+ AWS = [
+ "arn:aws:iam::324037278566:root",
+ "arn:aws:iam::218289152745:root",
]
}
+ Sid = "RoleDenyAssumeRole"
},
]
# (1 unchanged attribute hidden)
}
)
id = "qh-core-gbl-root-tfstate"
name = "qh-core-gbl-root-tfstate"
tags = {
"Environment" = "use1"
"Name" = "qh-core-gbl-root-tfstate"
"Namespace" = "qh"
"Stage" = "root"
"Tenant" = "core"
}
# (9 unchanged attributes hidden)
# (1 unchanged block hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
aws_iam_role.default["qh-core-gbl-root-tfstate"]: Modifying... [id=qh-core-gbl-root-tfstate]
╷
│ Error: updating IAM Role (qh-core-gbl-root-tfstate) assume role policy: operation error IAM: UpdateAssumeRolePolicy, https response error StatusCode: 409, RequestID: 476e705b-fc78-4573-b9c1-3a3e37a6d81e, LimitExceeded: Cannot exceed quota for ACLSizePerRole: 2048
│
│ with aws_iam_role.default["qh-core-gbl-root-tfstate"],
│ on iam.tf line 81, in resource "aws_iam_role" "default":
│ 81: resource "aws_iam_role" "default" {
│
╵
Error
exit status 1
Error
|
Beta Was this translation helpful? Give feedback.
-
Hi @j4zzcat Has your question been answered? |
Beta Was this translation helpful? Give feedback.
-
@j4zzcat, just checking in—do Dan’s replies above resolve your question? If so, feel free to mark this as answered. Let us know if there’s anything still unclear! |
Beta Was this translation helpful? Give feedback.
ah we need
tfstate-backend
as well