Skip to content

Update terraform-production.tfvars #336

Update terraform-production.tfvars

Update terraform-production.tfvars #336

name: Run tests and apply terraform changes for current branch
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: |
./scripts/setup
- name: Deploy production
if: success() && github.ref == 'refs/heads/production'
env:
ENV: production
AWS_ACCESS_KEY_ID: ${{ secrets.aws_key_production }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.aws_secret_production }}
AWS_REGION: ${{ secrets.aws_region_production }}
GFW_API_TOKEN: ${{ secrets.gfw_api_token_production }}
SLACK_DATA_UPDATES_HOOK: ${{ secrets.slack_data_updates_hook }}
RDS_PASSWORD: ${{ secrets.rds_password_production }}
RDS_PASSWORD_RO: ${{ secrets.rds_password_ro_production }}
GCS_GFW_GEE_EXPORT_KEY: ${{ secrets.gcs_gfw_gee_export_key }}
PLANET_API_KEY: ${{secrets.planet_api_key }}
JTERRY_IP: ${{ secrets.jterry_ip }}
DMANNARINO_IP: ${{ secrets.dmannarino_ip }}
SNEGUSSE_IP: ${{ secrets.snegusse_ip }}
GTEMPUS_IP: ${{ secrets.gtempus_ip }}
OFFICE_3SC_IP: ${{ secrets.office_3sc_ip }}
VPN_3SC_IP: ${{ secrets.vpn_3sc_ip }}
run: |
./scripts/infra plan -var "gfw_api_token=${GFW_API_TOKEN}" \
-var "slack_data_updates_hook=${SLACK_DATA_UPDATES_HOOK}" \
-var "rds_password=${RDS_PASSWORD}" \
-var "rds_password_ro=${RDS_PASSWORD_RO}" \
-var "gfw-gee-export_key=${GCS_GFW_GEE_EXPORT_KEY}" \
-var "planet_api_key=${PLANET_API_KEY}" \
-var "jterry_ip=${JTERRY_IP}" \
-var "dmannarino_ip=${DMANNARINO_IP}" \
-var "snegusse_ip=${SNEGUSSE_IP}" \
-var "gtempus_ip=${GTEMPUS_IP}" \
-var "office_3sc_ip=${OFFICE_3SC_IP}" \
-var "vpn_3sc_ip=${VPN_3SC_IP}"
./scripts/infra apply
- name: Deploy staging
if: success() && github.ref == 'refs/heads/staging'
env:
ENV: staging
AWS_ACCESS_KEY_ID: ${{ secrets.aws_key_staging }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.aws_secret_staging }}
AWS_REGION: ${{ secrets.aws_region_staging }}
GFW_API_TOKEN: ${{ secrets.gfw_api_token_staging }}
SLACK_DATA_UPDATES_HOOK: ${{ secrets.slack_data_updates_hook }}
RDS_PASSWORD: ${{ secrets.rds_password_staging }}
RDS_PASSWORD_RO: ${{ secrets.rds_password_ro_staging }}
GCS_GFW_GEE_EXPORT_KEY: ${{ secrets.gcs_gfw_gee_export_key }}
PLANET_API_KEY: ${{secrets.planet_api_key }}
JTERRY_IP: ${{ secrets.jterry_ip }}
DMANNARINO_IP: ${{ secrets.dmannarino_ip }}
SNEGUSSE_IP: ${{ secrets.snegusse_ip }}
GTEMPUS_IP: ${{ secrets.gtempus_ip }}
OFFICE_3SC_IP: ${{ secrets.office_3sc_ip }}
VPN_3SC_IP: ${{ secrets.vpn_3sc_ip }}
run: |
./scripts/infra plan -var "gfw_api_token=${GFW_API_TOKEN}" \
-var "slack_data_updates_hook=${SLACK_DATA_UPDATES_HOOK}" \
-var "rds_password=${RDS_PASSWORD}" \
-var "rds_password_ro=${RDS_PASSWORD_RO}" \
-var "gfw-gee-export_key=${GCS_GFW_GEE_EXPORT_KEY}" \
-var "planet_api_key=${PLANET_API_KEY}" \
-var "jterry_ip=${JTERRY_IP}" \
-var "dmannarino_ip=${DMANNARINO_IP}" \
-var "snegusse_ip=${SNEGUSSE_IP}" \
-var "gtempus_ip=${GTEMPUS_IP}" \
-var "office_3sc_ip=${OFFICE_3SC_IP}" \
-var "vpn_3sc_ip=${VPN_3SC_IP}"
./scripts/infra apply
- name: Deploy dev
if: success() && github.ref == 'refs/heads/dev'
env:
ENV: dev
AWS_ACCESS_KEY_ID: ${{ secrets.aws_key_dev }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.aws_secret_dev }}
AWS_REGION: ${{ secrets.aws_region_dev }}
GFW_API_TOKEN: ${{ secrets.gfw_api_token_staging }}
SLACK_DATA_UPDATES_HOOK: ${{ secrets.slack_data_updates_hook }}
RDS_PASSWORD: ${{ secrets.rds_password_dev }}
RDS_PASSWORD_RO: ${{ secrets.rds_password_ro_dev }}
GCS_GFW_GEE_EXPORT_KEY: ${{ secrets.gcs_gfw_gee_export_key }}
PLANET_API_KEY: ${{secrets.planet_api_key }}
JTERRY_IP: ${{ secrets.jterry_ip }}
DMANNARINO_IP: ${{ secrets.dmannarino_ip }}
SNEGUSSE_IP: ${{ secrets.snegusse_ip }}
GTEMPUS_IP: ${{ secrets.gtempus_ip }}
OFFICE_3SC_IP: ${{ secrets.office_3sc_ip }}
VPN_3SC_IP: ${{ secrets.vpn_3sc_ip }}
run: |
./scripts/infra plan -var "gfw_api_token=${GFW_API_TOKEN}" \
-var "slack_data_updates_hook=${SLACK_DATA_UPDATES_HOOK}" \
-var "rds_password=${RDS_PASSWORD}" \
-var "rds_password_ro=${RDS_PASSWORD_RO}" \
-var "gfw-gee-export_key=${GCS_GFW_GEE_EXPORT_KEY}" \
-var "planet_api_key=${PLANET_API_KEY}" \
-var "jterry_ip=${JTERRY_IP}" \
-var "dmannarino_ip=${DMANNARINO_IP}" \
-var "snegusse_ip=${SNEGUSSE_IP}" \
-var "gtempus_ip=${GTEMPUS_IP}" \
-var "office_3sc_ip=${OFFICE_3SC_IP}" \
-var "vpn_3sc_ip=${VPN_3SC_IP}"
./scripts/infra apply