π― Metrics Server
cd ${WORKING_DIR}/modules/metrics-server
terraform init -reconfigure -backend-config="region=${AWS_REGION}" \
-backend-config="bucket=${TF_STATE_S3_BUCKET}" \
-backend-config="key=${PROJECT_ID}-metrics-server.tfstate" \
-backend-config="dynamodb_table=${TF_STATE_DYNAMODB_TABLE}"
terraform plan -out tfplan
terraform apply -input=false -auto-approve tfplan
cd ../..
π― Cluster Autoscaler
cd ${WORKING_DIR}/modules/autoscaler
terraform init -reconfigure -backend-config="region=${AWS_REGION}" \
-backend-config="bucket=${TF_STATE_S3_BUCKET}" \
-backend-config="key=${PROJECT_ID}-cluster-autoscaler.tfstate" \
-backend-config="dynamodb_table=${TF_STATE_DYNAMODB_TABLE}"
terraform plan -out tfplan
terraform apply -input=false -auto-approve tfplan
cd ../..
π― Node Termination Handler
cd ${WORKING_DIR}/modules/node-termination-handler
terraform init -reconfigure -backend-config="region=${AWS_REGION}" \
-backend-config="bucket=${TF_STATE_S3_BUCKET}" \
-backend-config="key=${PROJECT_ID}-node-termination-handler.tfstate" \
-backend-config="dynamodb_table=${TF_STATE_DYNAMODB_TABLE}"
terraform plan -out tfplan
terraform apply -input=false -auto-approve tfplan
cd ../..
π― AWS X-Ray
cd ${WORKING_DIR}/modules/xray
terraform init -reconfigure -backend-config="region=${AWS_REGION}" \
-backend-config="bucket=${TF_STATE_S3_BUCKET}" \
-backend-config="key=${PROJECT_ID}-xray.tfstate" \
-backend-config="dynamodb_table=${TF_STATE_DYNAMODB_TABLE}"
terraform plan -out tfplan
terraform apply -input=false -auto-approve tfplan
cd ../..
π― VPC-CNI
cd ${WORKING_DIR}/modules/vpc-cni
terraform init -reconfigure -backend-config="region=${AWS_REGION}" \
-backend-config="bucket=${TF_STATE_S3_BUCKET}" \
-backend-config="key=${PROJECT_ID}-vpc-cni.tfstate" \
-backend-config="dynamodb_table=${TF_STATE_DYNAMODB_TABLE}"
terraform plan -out tfplan
terraform apply -input=false -auto-approve tfplan
cd ../..
π― EFS
cd ${WORKING_DIR}/modules/efs
terraform init -reconfigure -backend-config="region=${AWS_REGION}" \
-backend-config="bucket=${TF_STATE_S3_BUCKET}" \
-backend-config="key=${PROJECT_ID}-efs.tfstate" \
-backend-config="dynamodb_table=${TF_STATE_DYNAMODB_TABLE}"
terraform plan -out tfplan
terraform apply -input=false -auto-approve tfplan
cd ../..