Skip to content

Commit

Permalink
run fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
sohanyadav committed Nov 7, 2024
1 parent a49e47c commit a78f748
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions aws_csi_secrets_store.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ resource "null_resource" "csi_secrets_store_aws_provider" {


resource "aws_iam_policy" "secrets_policy" {
count = var.csi_secrets_store_enabled ? 1 : 0
count = var.csi_secrets_store_enabled ? 1 : 0
name = "csi-secrets-access-policy-${var.environment_name}"
description = "Policy for accessing secrets in AWS Secrets Manager"

Expand Down Expand Up @@ -95,26 +95,26 @@ data "aws_iam_policy_document" "trust_relationship" {
}

resource "aws_iam_role" "secrets_manager_role" {
count = var.csi_secrets_store_enabled ? 1 : 0
count = var.csi_secrets_store_enabled ? 1 : 0
name = "shared_secrets_manager_role"
assume_role_policy = data.aws_iam_policy_document.trust_relationship.json
}

resource "aws_iam_role_policy_attachment" "secrets_manager_attachment" {
count = var.csi_secrets_store_enabled ? 1 : 0
role = join("",aws_iam_role.secrets_manager_role.*.name)
policy_arn = join ("", aws_iam_policy.secrets_policy.*.arn)
count = var.csi_secrets_store_enabled ? 1 : 0
role = join("", aws_iam_role.secrets_manager_role.*.name)
policy_arn = join("", aws_iam_policy.secrets_policy.*.arn)
}


resource "kubernetes_service_account" "main" {
for_each = toset(var.csi_enabled_namespaces)
for_each = toset(var.csi_enabled_namespaces)

metadata {
name = "csi-secrets-service-account"
namespace = each.key
annotations = {
"eks.amazonaws.com/role-arn" = join("",aws_iam_role.secrets_manager_role.*.arn)
"eks.amazonaws.com/role-arn" = join("", aws_iam_role.secrets_manager_role.*.arn)
}
}
}
2 changes: 1 addition & 1 deletion examples/eks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ module "opszero-eks" {
efs_enabled = false
#csi
s3_csi_driver_enabled = false
s3_csi_bucket_names = ["test-6647373dd"] #name of s3
s3_csi_bucket_names = ["test-6647373dd"] #name of s3
}

module "helm-common" {
Expand Down
6 changes: 3 additions & 3 deletions locals.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
locals {
alb_name = "aws-load-balancer-controller"
alb_name = "aws-load-balancer-controller"
oidc_provider_arn = "arn:aws:iam::${data.aws_caller_identity.current.account_id}:oidc-provider/${replace(aws_eks_cluster.cluster.identity[0].oidc[0].issuer, "https://", "")}"
partition = data.aws_partition.current.partition
account_id = data.aws_caller_identity.current.account_id
partition = data.aws_partition.current.partition
account_id = data.aws_caller_identity.current.account_id
# https://github.com/aws-samples/amazon-cloudwatch-container-insights/releases
eks_pod_logs_cloudwatch_fluent_bit_version = "1.3.19"

Expand Down

0 comments on commit a78f748

Please sign in to comment.