Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
vmttn committed Aug 28, 2023
1 parent 766d181 commit 840322d
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,30 @@ jobs:

environment: staging

container:
image: hashicorp/terraform:1.4.0
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
volumes:
- .:/deployment
options: --workdir /deployment

steps:
- uses: actions/checkout@v2

- name: tf init
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
docker compose run --rm \
-e AWS_ACCESS_KEY_ID \
-e AWS_SECRET_ACCESS_KEY \
tf -chdir=environments/staging init \
terraform -chdir=environments/staging init \
-backend-config "bucket=data-inclusion-terraform" \
-backend-config "key=stack_data/staging" \
-backend-config "region=fr-par" \
-backend-config "endpoint=https://s3.fr-par.scw.cloud"
docker compose run --rm tf -chdir=environments/staging plan
- name: tf validate
run: |
docker compose run --rm tf -chdir=environments/staging validate
terraform -chdir=environments/staging validate
- name: tf plan
run: |
docker compose run --rm tf -chdir=environments/staging plan
terraform -chdir=environments/staging plan

0 comments on commit 840322d

Please sign in to comment.