Skip to content

Commit

Permalink
Iterating GH Action Mon Jan 6 03:21:36 PM EST 2025
Browse files Browse the repository at this point in the history
  • Loading branch information
jadudm committed Jan 6, 2025
1 parent 64ebc53 commit 3a4ce4b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/deploy-to-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AWS_CONFIG_FILE: "${GITHUB_WORKSPACE}/aws-config"
AWS_SHARED_CREDENTIALS_FILE: "${GITHUB_WORKSPACE}/aws-credentials"
REPO: "${GITHUB_WORKSPACE}/jemison"
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -57,7 +58,7 @@ jobs:
# https://stackoverflow.com/questions/63048738/how-to-declare-variables-for-s3-backend-in-terraform
- name: Setup TF creds for state bucket
run: |
tee "${GITHUB_WORKSPACE}/terraform/${{ inputs.environment }}/backend_${{ inputs.environment }}.config" <<EOF
tee "${REPO}/terraform/${{ inputs.environment }}/backend_${{ inputs.environment }}.config" <<EOF
bucket="${{ secrets.TF_VAR_BUCKET_NAME }}"
region="${{ secrets.TF_VAR_AWS_DEFAULT_REGION}}"
access_key="${{ secrets.TF_VAR_AWS_ACCESS_KEY_ID }}"
Expand All @@ -67,7 +68,7 @@ jobs:
- name: Setup TF vars for execution
run: |
tee "${GITHUB_WORKSPACE}/terraform/${{ inputs.environment }}/terraform.tfvars" <<EOF
tee "${REPO}/terraform/${{ inputs.environment }}/terraform.tfvars" <<EOF
cf_username = "${{ secrets.CF_USERNAME }}"
cf_password = "${{ secrets.CF_PASSWORD }}"
api_key = "FIXME"
Expand All @@ -90,15 +91,15 @@ jobs:

- name: TF init
run: |
pushd ${GITHUB_WORKSPACE}/terraform/${{ inputs.environment }}
pushd ${REPO}/terraform/${{ inputs.environment }}
terraform init -backend-config="./backend_${{ inputs.environment }}.config" || echo "Failed" && exit
popd
- name: TF plan
uses: dflook/terraform-plan@v1
with:
path: ${GITHUB_WORKSPACE}/terraform/${{ inputs.environment }}
backend_config_file: "${GITHUB_WORKSPACE}/terraform/${{ inputs.environment }}/backend_${{ inputs.environment}}.config"
path: ${REPO}/terraform/${{ inputs.environment }}
backend_config_file: "${REPO}/terraform/${{ inputs.environment }}/backend_${{ inputs.environment}}.config"

# - name: TF apply
# run: |
Expand Down

0 comments on commit 3a4ce4b

Please sign in to comment.