Skip to content

Commit

Permalink
Merge pull request #24 from kabisa/feat/iam-permissions
Browse files Browse the repository at this point in the history
Update IAM policy
  • Loading branch information
Glaaj committed Jan 5, 2024
2 parents 7c1639b + 7c6b48e commit e4e6388
Showing 1 changed file with 31 additions and 7 deletions.
38 changes: 31 additions & 7 deletions policy.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
# Generated based on: https://github.com/kubernetes-sigs/aws-load-balancer-controller/blob/main/docs/install/iam_policy.json
# Commit version: https://github.com/kubernetes-sigs/aws-load-balancer-controller/commit/cc59a8c6bd521f2e334b81cb0132652fbb3f5d9d
# Tool used: https://github.com/flosell/iam-policy-json-to-terraform
# Matches chart: version: 1.4.1
# appVersion: v2.4.1


data "aws_iam_policy_document" "policy" {
statement {
Expand Down Expand Up @@ -230,6 +224,36 @@ data "aws_iam_policy_document" "policy" {
]
}

statement {
sid = ""
effect = "Allow"

resources = [
"arn:aws:elasticloadbalancing:*:*:targetgroup/*/*",
"arn:aws:elasticloadbalancing:*:*:loadbalancer/net/*/*",
"arn:aws:elasticloadbalancing:*:*:loadbalancer/app/*/*"
]

actions = [
"elasticloadbalancing:AddTags",
]

condition {
test = "StringEquals"
variable = "elasticloadbalancing:CreateAction"
values = [
"CreateTargetGroup",
"CreateLoadBalancer"
]
}

condition {
test = "Null"
variable = "aws:ResourceTag/elbv2.k8s.aws/cluster"
values = ["false"]
}
}

statement {
sid = ""
effect = "Allow"
Expand Down Expand Up @@ -277,4 +301,4 @@ data "aws_iam_policy_document" "policy" {
"elasticloadbalancing:ModifyRule",
]
}
}
}

0 comments on commit e4e6388

Please sign in to comment.