diff --git a/.github/workflows/deploy-daily-snapshot.yml b/.github/workflows/deploy-daily-snapshot.yml index 96dafb0d1..a533ee338 100644 --- a/.github/workflows/deploy-daily-snapshot.yml +++ b/.github/workflows/deploy-daily-snapshot.yml @@ -23,6 +23,8 @@ on: jobs: deploy-daily-snapshot: + env: + TF_VAR_monitoring: "{ \"enable\": true,\"slack_enable\":true,\"slack_destination_id\":\"${{ secrets.SLACK_DESTINATION_ID }}\",\"slack_channel_id\":\"${{ secrets.SLACK_CHANNEL_ID }}\"}" runs-on: ubuntu-latest permissions: write-all steps: @@ -39,7 +41,8 @@ jobs: r2_access_key: ${{ secrets.R2_ACCESS_KEY }} r2_secret_key: ${{ secrets.R2_SECRET_KEY }} slack_token: ${{ secrets.SLACK_TOKEN }} - working_directory: tf-managed/live/environments/prod/applications/snapshot-service + working_directory: tf-managed/live/environments/dev/applications/snapshot-service service_name: Snapshot Service new_relic_account_id: ${{ secrets.NEW_RELIC_ACCOUNT_ID }} new_relic_api_key: ${{ secrets.NEW_RELIC_API_KEY }} + ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} diff --git a/.github/workflows/deploy-sync-check.yml b/.github/workflows/deploy-sync-check.yml index 922ef4930..f2aaf781e 100644 --- a/.github/workflows/deploy-sync-check.yml +++ b/.github/workflows/deploy-sync-check.yml @@ -39,7 +39,8 @@ jobs: r2_access_key: ${{ secrets.R2_ACCESS_KEY }} r2_secret_key: ${{ secrets.R2_SECRET_KEY }} slack_token: ${{ secrets.SLACK_TOKEN }} - working_directory: tf-managed/live/environments/prod/applications/sync-check + working_directory: tf-managed/live/environments/dev/applications/sync-check service_name: Sync Check Service new_relic_account_id: ${{ secrets.NEW_RELIC_ACCOUNT_ID }} new_relic_api_key: ${{ secrets.NEW_RELIC_API_KEY }} + ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} diff --git a/composite-action/terragrunt/action.yml b/composite-action/terragrunt/action.yml index f72ce4ff7..93828fc6c 100644 --- a/composite-action/terragrunt/action.yml +++ b/composite-action/terragrunt/action.yml @@ -19,6 +19,8 @@ inputs: working_directory: description: 'The working Directory' required: true + ssh_private_key: + description: 'The SSH private key to use for connecting to Droplets via SSH' slack_token: description: 'The slack token secret used to connect the Infrastructure to Slack' new_relic_api_key: @@ -138,8 +140,14 @@ runs: shell: bash run: exit 1 + - name: Configure ssh-agent + # if: github.ref == 'refs/heads/main' && ( github.event_name == 'push' || github.event_name == 'workflow_dispatch' ) + uses: webfactory/ssh-agent@v0.8.0 + with: + ssh-private-key: ${{ inputs.ssh_private_key }} + - name: Terragrunt Apply - if: github.ref == 'refs/heads/main' && github.event_name == 'push' + # if: github.ref == 'refs/heads/main' && github.event_name == 'push' shell: bash run: | if grep -q 'No changes.' ${{ github.workspace }}/tfplan; then