diff --git a/.github/workflows/core-logging-deployment.yml b/.github/workflows/core-logging-deployment.yml index 8b7e97dc0..85162acc7 100644 --- a/.github/workflows/core-logging-deployment.yml +++ b/.github/workflows/core-logging-deployment.yml @@ -33,11 +33,23 @@ defaults: shell: bash jobs: - core-logging-deployment-plan-apply: - uses: ./.github/workflows/reusable_terraform_plan_apply.yml - with: - working-directory: "terraform/environments/core-logging" - environment: production + retrieve-secrets: + uses: ministryofjustice/modernisation-platform-github-actions/.github/workflows/aws-secrets-management.yml@ce6aae491e57d583c65ae6e83ae58cd7d02a13da # v1.0.0 secrets: - modernisation_platform_environments: "${{ secrets.MODERNISATION_PLATFORM_ENVIRONMENTS }}" - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file + MODERNISATION_PLATFORM_ACCOUNT_NUMBER: ${{ secrets.MODERNISATION_PLATFORM_ACCOUNT_NUMBER }} + PASSPHRASE: ${{ secrets.PASSPHRASE }} + core-logging-deployment-plan-apply: + needs: retrieve-secrets + runs-on: ubuntu-latest + steps: + - name: Decrypt Secrets + uses: ministryofjustice/modernisation-platform-github-actions/decrypt-secrets@ce6aae491e57d583c65ae6e83ae58cd7d02a13da # v1.0.0 + with: + environment_management: ${{ needs.retrieve-secrets.outputs.environment_management }} + slack_webhook_url: ${{ needs.retrieve-secrets.outputs.slack_webhook_url }} + PASSPHRASE: ${{ secrets.PASSPHRASE }} + - name: Run Reusable Terraform Plan Apply Workflow + uses: ./.github/workflows/reusable_terraform_plan_apply.yml + with: + working-directory: "terraform/environments/core-logging" + environment: production \ No newline at end of file diff --git a/.github/workflows/reusable_terraform_plan_apply.yml b/.github/workflows/reusable_terraform_plan_apply.yml index 7cc46160d..dc1fd7102 100644 --- a/.github/workflows/reusable_terraform_plan_apply.yml +++ b/.github/workflows/reusable_terraform_plan_apply.yml @@ -24,25 +24,10 @@ on: description: 'Unique ID for the calling workflow' required: false type: string - secrets: - modernisation_platform_environments: - required: true - SLACK_WEBHOOK_URL: - required: true - pagerduty_token: - required: false - pagerduty_userapi_token: - required: false - gh_workflow_token: - required: false env: - ENVIRONMENT_MANAGEMENT: "${{ secrets.modernisation_platform_environments }}" - TF_VAR_github_token: "${{ secrets.gh_workflow_token }}" TF_IN_AUTOMATION: true - TF_VAR_pagerduty_token: ${{ secrets.pagerduty_token }} - TF_VAR_pagerduty_user_token: ${{ secrets.pagerduty_userapi_token }} - + jobs: plan-and-apply: runs-on: ubuntu-latest