Skip to content

Commit

Permalink
Update oidc-iam-policies.tf with correct cluster_name reference
Browse files Browse the repository at this point in the history
  • Loading branch information
marcincuber authored Nov 2, 2023
1 parent 3b59534 commit fd6e733
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions terraform/oidc-iam-policies.tf
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ data "aws_iam_policy_document" "karpenter_controller" {

condition {
test = "StringEquals"
variable = "aws:RequestTag/kubernetes.io/cluster/${local.eks_cluster_name}"
variable = "aws:RequestTag/kubernetes.io/cluster/${var.name_prefix}"

values = [
"owned"
Expand Down Expand Up @@ -399,7 +399,7 @@ data "aws_iam_policy_document" "karpenter_controller" {

condition {
test = "StringEquals"
variable = "aws:RequestTag/kubernetes.io/cluster/${local.eks_cluster_name}"
variable = "aws:RequestTag/kubernetes.io/cluster/${var.name_prefix}"

values = [
"owned"
Expand Down Expand Up @@ -439,7 +439,7 @@ data "aws_iam_policy_document" "karpenter_controller" {

condition {
test = "StringEquals"
variable = "aws:RequestTag/kubernetes.io/cluster/${local.eks_cluster_name}"
variable = "aws:RequestTag/kubernetes.io/cluster/${var.name_prefix}"

values = [
"owned"
Expand Down Expand Up @@ -480,7 +480,7 @@ data "aws_iam_policy_document" "karpenter_controller" {

condition {
test = "StringEquals"
variable = "aws:RequestTag/kubernetes.io/cluster/${local.eks_cluster_name}"
variable = "aws:RequestTag/kubernetes.io/cluster/${var.name_prefix}"

values = [
"owned"
Expand Down Expand Up @@ -589,7 +589,7 @@ data "aws_iam_policy_document" "karpenter_controller" {

condition {
test = "StringEquals"
variable = "aws:RequestTag/kubernetes.io/cluster/${local.eks_cluster_name}"
variable = "aws:RequestTag/kubernetes.io/cluster/${var.name_prefix}"

values = [
"owned"
Expand Down Expand Up @@ -628,7 +628,7 @@ data "aws_iam_policy_document" "karpenter_controller" {

condition {
test = "StringEquals"
variable = "aws:ResourceTag/kubernetes.io/cluster/${local.eks_cluster_name}"
variable = "aws:ResourceTag/kubernetes.io/cluster/${var.name_prefix}"

values = [
"owned"
Expand All @@ -646,7 +646,7 @@ data "aws_iam_policy_document" "karpenter_controller" {

condition {
test = "StringEquals"
variable = "aws:RequestTag/kubernetes.io/cluster/${local.eks_cluster_name}"
variable = "aws:RequestTag/kubernetes.io/cluster/${var.name_prefix}"

values = [
"owned"
Expand Down Expand Up @@ -696,7 +696,7 @@ data "aws_iam_policy_document" "karpenter_controller" {

condition {
test = "StringEquals"
variable = "aws:ResourceTag/kubernetes.io/cluster/${local.eks_cluster_name}"
variable = "aws:ResourceTag/kubernetes.io/cluster/${var.name_prefix}"

values = [
"owned"
Expand Down Expand Up @@ -740,7 +740,7 @@ data "aws_iam_policy_document" "karpenter_controller" {
]

resources = [
"arn:${data.aws_partition.current.partition}:eks:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:cluster/${local.eks_cluster_name}",
"arn:${data.aws_partition.current.partition}:eks:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:cluster/${var.name_prefix}",
]
}

Expand Down

0 comments on commit fd6e733

Please sign in to comment.