Skip to content

Commit

Permalink
var
Browse files Browse the repository at this point in the history
  • Loading branch information
jbhv12 committed Dec 9, 2023
1 parent 9887da9 commit 042ef1b
Showing 1 changed file with 28 additions and 15 deletions.
43 changes: 28 additions & 15 deletions .github/workflows/terraform-apply.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,21 @@ jobs:

- name: Terraform Init
working-directory: infra/prod
run: terraform init
run: |
export TF_VAR_env="prod"
export TF_VAR_gcp_project_id="${{ secrets.GCP_PROJECT_ID }}"
export TF_VAR_aws_cognito_user_pool_id="${{ secrets.COGNITO_USER_POOL_ID }}"
export TF_VAR_aws_cognito_client_id="${{ secrets.COGNITO_CLIENT_ID }}"
export TF_VAR_aws_cognito_domain="${{ secrets.COGNITO_DOMAIN }}"
export TF_VAR_aws_cognito_client_secret="${{ secrets.COGNITO_CLIENT_SECRET }}"
export TF_VAR_aws_cognito_redirect_url="${{ secrets.COGNITO_REDIRECT_URI }}"
export TF_VAR_chainlit_auth_secret="${{ secrets.CHAINLIT_AUTH_SECRET }}"
export TF_VAR_chainlit_api_key="${{ secrets.CHAINLIT_API_KEY }}"
export TF_VAR_openai_api_key="${{ secrets.OPENAI_API_KEY }}"
export TF_VAR_redis_port="${{ secrets.REDIS_PORT }}"
export TF_VAR_redis_db="${{ secrets.REDIS_DB }}"
export TF_VAR_redis_ttl="${{ secrets.REDIS_TTL }}"
terraform init
env:
GOOGLE_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
GOOGLE_CREDENTIALS: ${{ secrets.GCP_SA_KEY }}
Expand Down Expand Up @@ -55,20 +69,19 @@ jobs:
- name: Terraform Apply
working-directory: infra/prod
run: |
export TF_VAR_env="prod"
export TF_VAR_gcp_project_id="${{ secrets.GCP_PROJECT_ID }}"
export TF_VAR_aws_cognito_user_pool_id="${{ secrets.COGNITO_USER_POOL_ID }}"
export TF_VAR_aws_cognito_client_id="${{ secrets.COGNITO_CLIENT_ID }}"
export TF_VAR_aws_cognito_domain="${{ secrets.COGNITO_DOMAIN }}"
export TF_VAR_aws_cognito_client_secret="${{ secrets.COGNITO_CLIENT_SECRET }}"
export TF_VAR_aws_cognito_redirect_url="${{ secrets.COGNITO_REDIRECT_URI }}"
export TF_VAR_chainlit_auth_secret="${{ secrets.CHAINLIT_AUTH_SECRET }}"
export TF_VAR_chainlit_api_key="${{ secrets.CHAINLIT_API_KEY }}"
export TF_VAR_openai_api_key="${{ secrets.OPENAI_API_KEY }}"
export TF_VAR_redis_port="${{ secrets.REDIS_PORT }}"
export TF_VAR_redis_db="${{ secrets.REDIS_DB }}"
export TF_VAR_redis_ttl="${{ secrets.REDIS_TTL }}"
# export TF_VAR_env="prod"
# export TF_VAR_gcp_project_id="${{ secrets.GCP_PROJECT_ID }}"
# export TF_VAR_aws_cognito_user_pool_id="${{ secrets.COGNITO_USER_POOL_ID }}"
# export TF_VAR_aws_cognito_client_id="${{ secrets.COGNITO_CLIENT_ID }}"
# export TF_VAR_aws_cognito_domain="${{ secrets.COGNITO_DOMAIN }}"
# export TF_VAR_aws_cognito_client_secret="${{ secrets.COGNITO_CLIENT_SECRET }}"
# export TF_VAR_aws_cognito_redirect_url="${{ secrets.COGNITO_REDIRECT_URI }}"
# export TF_VAR_chainlit_auth_secret="${{ secrets.CHAINLIT_AUTH_SECRET }}"
# export TF_VAR_chainlit_api_key="${{ secrets.CHAINLIT_API_KEY }}"
# export TF_VAR_openai_api_key="${{ secrets.OPENAI_API_KEY }}"
# export TF_VAR_redis_port="${{ secrets.REDIS_PORT }}"
# export TF_VAR_redis_db="${{ secrets.REDIS_DB }}"
# export TF_VAR_redis_ttl="${{ secrets.REDIS_TTL }}"
terraform plan -input=false -out=tfplan
# terraform apply -input=false tfplan
env:
Expand Down

0 comments on commit 042ef1b

Please sign in to comment.