Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for partial cloud config block #268

Merged
merged 13 commits into from
Jun 18, 2023
Merged
45 changes: 45 additions & 0 deletions .github/workflows/test-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,51 @@ jobs:
exit 1
fi

tfc_partial_cloud_workspace:
runs-on: ubuntu-latest
name: Partial TFC Cloud Configuration
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Create workspace
uses: ./terraform-new-workspace
env:
TERRAFORM_VERSION: 1.1.2
TERRAFORM_CLOUD_TOKENS: app.terraform.io=${{ secrets.TF_API_TOKEN }}
TF_CLOUD_ORGANIZATION: flooktech
with:
path: tests/workflows/test-version/partial-cloud
workspace: tfc_cloud_workspace-1

- name: Test terraform-version
uses: ./terraform-version
id: terraform-version
env:
TERRAFORM_CLOUD_TOKENS: app.terraform.io=${{ secrets.TF_API_TOKEN }}
TF_CLOUD_ORGANIZATION: flooktech
with:
path: tests/workflows/test-version/partial-cloud
workspace: tfc_cloud_workspace-1

- name: Destroy workspace
uses: ./terraform-destroy-workspace
env:
TERRAFORM_CLOUD_TOKENS: app.terraform.io=${{ secrets.TF_API_TOKEN }}
TF_CLOUD_ORGANIZATION: flooktech
with:
path: tests/workflows/test-version/partial-cloud
workspace: tfc_cloud_workspace-1

- name: Print the version
run: |
echo "The terraform version was ${{ steps.terraform-version.outputs.terraform }}"

if [[ "${{ steps.terraform-version.outputs.terraform }}" != "1.1.2" ]]; then
echo "::error:: Terraform version not set from remote workspace"
exit 1
fi

local_state:
runs-on: ubuntu-latest
name: Local State file
Expand Down
4 changes: 4 additions & 0 deletions tests/workflows/test-version/partial-cloud/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
terraform {
cloud {
}
}
Loading