diff --git a/.github/workflows/terraform-apply.yaml b/.github/workflows/terraform-apply.yaml index 74731f3..bff135d 100644 --- a/.github/workflows/terraform-apply.yaml +++ b/.github/workflows/terraform-apply.yaml @@ -29,6 +29,10 @@ jobs: version: 2 # default verbose: false # default arch: amd64 # allowed values: amd64, arm64 + - name: verify aws profile + run: | + aws sts get-caller-identity + aws configure list - name: install terraform uses: hashicorp/setup-terraform@v2 - name: checkout repository diff --git a/.github/workflows/terraform-plan.yaml b/.github/workflows/terraform-plan.yaml index ddc2186..7f36c0f 100644 --- a/.github/workflows/terraform-plan.yaml +++ b/.github/workflows/terraform-plan.yaml @@ -25,6 +25,10 @@ jobs: version: 2 # default verbose: false # default arch: amd64 # allowed values: amd64, arm64 + - name: verify aws profile + run: | + aws sts get-caller-identity + aws configure list - name: install terraform uses: hashicorp/setup-terraform@v2 - name: checkout repository diff --git a/terraform/environments/prod/eks.tf b/terraform/environments/prod/eks.tf index ec90374..4a6882a 100644 --- a/terraform/environments/prod/eks.tf +++ b/terraform/environments/prod/eks.tf @@ -12,7 +12,7 @@ data "aws_caller_identity" "current" {} data "aws_availability_zones" "available" {} data "aws_eks_cluster_auth" "default" { - name = module.eks.cluster_name + name = module.eks.cluster_id } provider "kubernetes" { diff --git a/terraform/environments/prod/variables.tf b/terraform/environments/prod/variables.tf index b02f6cf..bc31074 100644 --- a/terraform/environments/prod/variables.tf +++ b/terraform/environments/prod/variables.tf @@ -5,6 +5,9 @@ variable "project_name" { variable "region" { default = "us-east-1" } +variable "profile" { + default = "default" +} variable "availability_zones" { type = list(string) }