🎯 Application Load Balancer
export TF_VAR_vpc_id=$EKS_VPC_ID
export TF_VAR_eks_cluster_name=$EKS_CLUSTER_NAME
cd ${WORKING_DIR}/modules/alb
terraform init -reconfigure -backend-config="region=${AWS_REGION}" \
-backend-config="bucket=${TF_STATE_S3_BUCKET}" \
-backend-config="key=${PROJECT_ID}-alb.tfstate" \
-backend-config="dynamodb_table=${TF_STATE_DYNAMODB_TABLE}"
terraform plan -out tfplan
terraform apply -input=false -auto-approve tfplan
cd ../..
🎯 Network Load Balancer
export TF_VAR_eks_cluster_name=$EKS_CLUSTER_NAME
cd ${WORKING_DIR}/modules/nlb
terraform init -reconfigure -backend-config="region=${AWS_REGION}" \
-backend-config="bucket=${TF_STATE_S3_BUCKET}" \
-backend-config="key=${PROJECT_ID}-nlb.tfstate" \
-backend-config="dynamodb_table=${TF_STATE_DYNAMODB_TABLE}"
terraform plan -out tfplan
terraform apply -input=false -auto-approve tfplan
cd ../..