Fix account id #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow that is manually triggered | |
name: Terraform Edison YAML Apply | |
# Controls when the action will run. Workflow runs when manually triggered using the UI | |
# or API. | |
on: | |
# but only for the main branch | |
push: | |
paths: | |
- 'edison-ai-yaml/**' | |
- 'edison-ai-yaml-tf-scripts/**' | |
- '.github/workflows/edison-yaml-tfapply.yaml' | |
branches: | |
- main | |
#pull_request: | |
#types: [edited, opened, synchronize, reopened] | |
env: | |
SPECTROCLOUD_TF_PATH: edison-ai-yaml-tf-scripts | |
SPECTROCLOUD_WORKSPACE: default | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "greet" | |
apply: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ${{ env.SPECTROCLOUD_TF_PATH }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: hashicorp/setup-terraform@v2 | |
with: | |
terraform_version: 1.5.0 | |
- name: Terraform fmt | |
id: fmt | |
run: terraform fmt -check | |
continue-on-error: true | |
- name: Terraform Init | |
id: init | |
run: terraform init -backend-config="access_key=${{ secrets.SC_S3_ACCESS_KEY }}" -backend-config="secret_key=${{ secrets.SC_S3_SECRET_KEY }}" | |
- name: Terraform Workspace | |
id: workspace | |
run: terraform workspace select ${{ env.SPECTROCLOUD_WORKSPACE }} | |
- name: Terraform Validate | |
id: validate | |
run: terraform validate -no-color | |
- name: Terraform Apply | |
id: apply | |
run: | | |
terraform apply -auto-approve -no-color -input=false \ | |
-var 'sc_host=${{ secrets.SC_HOST }}' \ | |
-var 'sc_project_name=Default' \ | |
-var 'sc_api_key=${{ secrets.SC_API_KEY }}' \ |