Skip to content

workspace id

workspace id #38

Workflow file for this run

name: Deploy
# https://github.com/hashicorp-education/learn-terraform-github-actions/blob/main/.github/workflows/terraform-apply.yml
on:
push:
branches:
- main
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
env:
DOCKER_BUILDKIT: 1
FORCE_COLOR: 1
jobs:
terraform:
name: Terraform
runs-on: ubuntu-22.04
permissions:
contents: read
env:
TF_CLOUD_ORGANIZATION: rhyek
TF_API_TOKEN: ${{ secrets.TF_API_TOKEN }}
TF_WORKSPACE: 'bank-bots-dev'
CONFIG_DIRECTORY: './infra'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Upload Configuration
uses: hashicorp/tfc-workflows-github/actions/[email protected]
id: apply-upload
with:
workspace: ${{ env.TF_WORKSPACE }}
directory: ${{ env.CONFIG_DIRECTORY }}
- name: Create Apply Run
uses: hashicorp/tfc-workflows-github/actions/[email protected]
id: apply-run
with:
workspace: ${{ env.TF_WORKSPACE }}
configuration_version: ${{ steps.apply-upload.outputs.configuration_version_id }}
- name: Apply
uses: hashicorp/tfc-workflows-github/actions/[email protected]
if: fromJSON(steps.apply-run.outputs.payload).data.attributes.actions.IsConfirmable
id: apply
with:
run: ${{ steps.apply-run.outputs.run_id }}
comment: 'Apply Run from GitHub Actions CI ${{ github.sha }}'
# - name: Configure AWS Credentials
# uses: aws-actions/configure-aws-credentials@v2
# with:
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# aws-region: ${{ vars.AWS_DEFAULT_REGION }}
- uses: dnsbty/[email protected]
with:
api-token: ${{ secrets.TF_API_TOKEN }}
workspace-id: ws-pftgvrxWKzhd2z9z
outputs: |
ecr_repository_scrape_txs_url
# - name: Outputs
# uses: hashicorp/tfc-workflows-github/actions/[email protected]
# id: outputs
# with:
# workspace: ${{ env.TF_WORKSPACE }}
# deploy-scrape-txs:
# name: Deploy Scrape Bank Transactions
# runs-on: ubuntu-22.04
# steps:
# - name: Checkout
# uses: actions/checkout@v3