Skip to content

Commit

Permalink
Merge pull request #266 from pymonger/develop
Browse files Browse the repository at this point in the history
populate kube config before helm is used
  • Loading branch information
LucaCinquini authored Jan 14, 2025
2 parents bdf1bd0 + a2a2669 commit 5506096
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions terraform-unity/modules/terraform-unity-sps-eks/data.tf
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
data "aws_caller_identity" "current" {}

data "aws_region" "current" {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
set -e

# update kube config
aws eks --region $1 update-kubeconfig --name $2
7 changes: 7 additions & 0 deletions terraform-unity/modules/terraform-unity-sps-eks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ module "unity-eks" {
cluster_version = "1.29"
}

resource "null_resource" "eks_post_deployment_actions" {
depends_on = [module.unity-eks]
provisioner "local-exec" {
command = "${path.module}/eks_post_deployment_actions.sh ${data.aws_region.current.name} ${local.cluster_name}"
}
}

# add extra policies as inline policy
resource "aws_iam_role_policy" "sps_airflow_eks_inline_policy" {
name = format(local.resource_name_prefix, "EksInlinePolicy")
Expand Down

0 comments on commit 5506096

Please sign in to comment.