From bbd2fc6c03a161f9841e000f121d62c55181c65c Mon Sep 17 00:00:00 2001 From: Lucas Mellos Carlos Date: Thu, 4 Jan 2024 14:52:14 -0300 Subject: [PATCH] debug --- .github/workflows/iac.yml | 49 +++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/.github/workflows/iac.yml b/.github/workflows/iac.yml index 6ab1e4b2..2dc02c35 100644 --- a/.github/workflows/iac.yml +++ b/.github/workflows/iac.yml @@ -132,29 +132,34 @@ jobs: uses: mdgreenwald/mozilla-sops-action@v1.5.0 with: version: 3.7.3 - - - name: Authenticate against Teleport to use Vault - if: inputs.TELEPORT_APP != '' - id: teleportapp - uses: ./actions/.github/actions/teleport - env: - TOKEN: ${{ secrets.TELEPORT_TOKEN }} - PROXY_URL: ${{ inputs.TELEPORT_PROXY_URL }} - with: - TELEPORT_APP: ${{ inputs.TELEPORT_APP }} - - - name: Configure Vault - if: inputs.TELEPORT_APP != '' - run: | - echo VAULT_ADDR=https://${{ inputs.TELEPORT_PROXY_URL }} >> $GITHUB_ENV - #echo VAULT_API_ADDR=https://${{ inputs.TELEPORT_PROXY_URL }} >> $GITHUB_ENV - echo VAULT_CLIENT_TIMEOUT=120s >> $GITHUB_ENV - echo VAULT_CLIENT_CERT=${{ steps.teleportapp.outputs.certificate-file }} >> $GITHUB_ENV - echo VAULT_CLIENT_KEY=${{ steps.teleportapp.outputs.key-file }} >> $GITHUB_ENV - echo VAULT_TOKEN=$VAULT_TOKEN >> $GITHUB_ENV - env: - VAULT_TOKEN: ${{ secrets.VAULT_TOKEN }} + - uses: innovationnorway/setup-vault@v1 + with: + version: '~> 1' + + - name: Authenticate against Teleport to use Vault + if: inputs.TELEPORT_APP != '' + id: teleportapp + uses: ./actions/.github/actions/teleport + env: + TOKEN: ${{ secrets.TELEPORT_TOKEN }} + PROXY_URL: ${{ inputs.TELEPORT_PROXY_URL }} + with: + TELEPORT_APP: ${{ inputs.TELEPORT_APP }} + + - name: Configure Vault + if: inputs.TELEPORT_APP != '' + run: | + echo VAULT_ADDR=https://${{ inputs.TELEPORT_PROXY_URL }} >> $GITHUB_ENV + #echo VAULT_API_ADDR=https://${{ inputs.TELEPORT_PROXY_URL }} >> $GITHUB_ENV + echo VAULT_CLIENT_TIMEOUT=120s >> $GITHUB_ENV + echo VAULT_CLIENT_CERT=${{ steps.teleportapp.outputs.certificate-file }} >> $GITHUB_ENV + echo VAULT_CLIENT_KEY=${{ steps.teleportapp.outputs.key-file }} >> $GITHUB_ENV + echo VAULT_TOKEN=$VAULT_TOKEN >> $GITHUB_ENV + env: + VAULT_TOKEN: ${{ secrets.VAULT_TOKEN }} + + - run: vault secrets list - uses: opentofu/setup-opentofu@v1 - name: Init