Skip to content

feat(deployment): provision scaleway with tf #6

feat(deployment): provision scaleway with tf

feat(deployment): provision scaleway with tf #6

Workflow file for this run

name: deployment
defaults:
run:
working-directory: deployment
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
jobs:
deploy:
runs-on: ubuntu-20.04
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 }}
TF_VAR_DATAWAREHOUSE_ADMIN_PASSWORD: ${{ secrets.TF_VAR_DATAWAREHOUSE_ADMIN_PASSWORD }}
TF_VAR_DATAWAREHOUSE_ADMIN_USERNAME: ${{ secrets.TF_VAR_DATAWAREHOUSE_ADMIN_USERNAME }}
TF_VAR_DATAWAREHOUSE_DI_DATABASE: ${{ secrets.TF_VAR_DATAWAREHOUSE_DI_DATABASE }}
TF_VAR_DATAWAREHOUSE_DI_PASSWORD: ${{ secrets.TF_VAR_DATAWAREHOUSE_DI_PASSWORD }}
TF_VAR_DATAWAREHOUSE_DI_USERNAME: ${{ secrets.TF_VAR_DATAWAREHOUSE_DI_USERNAME }}
TF_VAR_SCALEWAY_ACCESS_KEY: ${{ secrets.TF_VAR_SCALEWAY_ACCESS_KEY }}
TF_VAR_SCALEWAY_PROJECT_ID: ${{ secrets.TF_VAR_SCALEWAY_PROJECT_ID }}
TF_VAR_SCALEWAY_SECRET_KEY: ${{ secrets.TF_VAR_SCALEWAY_SECRET_KEY }}
volumes:
- .:/deployment
options: --workdir /deployment
steps:
- uses: actions/checkout@v2
- name: tf init
run: |
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"
- name: tf validate
run: |
terraform -chdir=environments/staging validate
- name: tf plan
run: |
terraform -chdir=environments/staging plan