Skip to content

Commit

Permalink
Merge pull request #23 from andrewlod/terraform
Browse files Browse the repository at this point in the history
Terraform deployment fixes
  • Loading branch information
andrewlod authored Apr 3, 2024
2 parents 8d76475 + d22ef20 commit 5ece228
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/deploy-eks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ env:
ECR_REPOSITORY: ${{ vars.ECR_REPOSITORY || 'authentication-api' }}
EKS_CLUSTER_NAME: ${{ vars.EKS_CLUSTER_NAME || 'default-cluster' }}
AWS_REGION: ${{ vars.AWS_REGION || 'us-east-1' }}
IMAGE_NAME: ${{ vars.IMAGE_NAME || 'authentication-api' }}
NODE_ENV: ${{ vars.NODE_ENV || 'development' }}
LOG_STRATEGY: ${{ vars.LOG_STRATEGY || 'CONSOLE' }}
SECRETS_LIST: ${{ vars.SECRETS_LIST || '' }}
SECRETS_LIST: ${{ vars.SECRETS_LIST || 'none' }}

PASSWORD_SALT: ${{ secrets.PASSWORD_SALT || '10' }}
PASSWORD_SALT: ${{ secrets.PASSWORD_SALT || '"10"' }}
JWT_SECRET: ${{ secrets.JWT_SECRET }}
JWT_EXPIRE_MINUTES: ${{ secrets.JWT_EXPIRE_MINUTES || '60' }}
JWT_EXPIRE_MINUTES: ${{ secrets.JWT_EXPIRE_MINUTES || '"60"' }}
JWT_COOKIE_KEY: ${{ secrets.JWT_COOKIE_KEY || 'JWT_COOKIE' }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}

Expand Down Expand Up @@ -70,7 +69,7 @@ jobs:

- name: Deploy to EKS
env:
IMAGE_NAME: "${{ steps.login-ecr.outputs.registry }}/$IMAGE_NAME:${IMAGE_TAG}"
IMAGE_NAME: "${{ steps.login-ecr.outputs.registry }}/${{ env.ECR_REPOSITORY }}:latest"
run: |
cat kubernetes/aws/deployment.yml | envsubst | kubectl apply -f - && \
kubectl apply -f kubernetes/aws/service.yml
3 changes: 3 additions & 0 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,9 @@ resource "aws_db_instance" "authentication_db" {
resource "aws_secretsmanager_secret" "db_secret" {
name = "${var.db_name}-${var.infra_env}-secret"

recovery_window_in_days = 0
force_overwrite_replica_secret = true

tags = {
"Environment" = var.infra_env
"Name" = "${var.db_name}-${var.infra_env}-secret"
Expand Down

0 comments on commit 5ece228

Please sign in to comment.