WOOP-1151: Add workload_custom_metrics_data_source TF resource #2133
Workflow file for this run
This file contains hidden or 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
| name: Terraform Examples Validation | |
| on: | |
| pull_request: | |
| branches: [ '*' ] | |
| paths-ignore: | |
| - '**.md.tmpl' | |
| jobs: | |
| terraform_validation: | |
| strategy: | |
| matrix: | |
| version: ["1.11", latest] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 # Updated to use Node.js 20 | |
| - name: Set up Terraform | |
| uses: hashicorp/setup-terraform@v3 # Updated to use Node.js 20 | |
| with: | |
| terraform_version: ${{ matrix.version }} | |
| - name: Print tf version | |
| run: terraform version | |
| - name: Setup Go 1.24.0 | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24.0' | |
| cache: true | |
| - name: Build binary | |
| run: go build . | |
| - name: Validate Terraform examples | |
| id: validate_examples | |
| run: make validate-terraform-examples | |
| - name: Plan an EKS example | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_TF_ACCEPTANCE_TEST_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_TF_ACCEPTANCE_TEST_SECRET_KEY_ID }} | |
| TF_VAR_cluster_name: gh-eks | |
| TF_VAR_cluster_region: us-east-1 | |
| TF_VAR_castai_api_token: ${{ secrets.CASTAI_TOKEN }} | |
| TF_VAR_castai_api_url: ${{ secrets.CASTAI_URL }} | |
| id: eks_plan_examples | |
| run: make plan-terraform-example EXAMPLE_DIR=examples/eks/eks_clusters | |
| - name: Plan a GKE example | |
| env: | |
| GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_TF_ACCEPTANCE_TEST_CREDENTIALS }} | |
| GOOGLE_PROJECT_ID: ${{ secrets.GOOGLE_TF_ACCEPTANCE_PROJECT_ID }} | |
| TF_VAR_project_id: ${{ secrets.GOOGLE_TF_ACCEPTANCE_PROJECT_ID }} | |
| TF_VAR_cluster_name: gh-gke | |
| TF_VAR_castai_api_token: ${{ secrets.CASTAI_TOKEN }} | |
| TF_VAR_castai_api_url: ${{ secrets.CASTAI_URL }} | |
| id: gke_plan_examples | |
| run: make plan-terraform-example EXAMPLE_DIR=examples/gke/gke_castai_iam | |
| - name: Plan an AKS example | |
| env: | |
| ARM_CLIENT_ID: ${{ secrets.AZURE_TF_ACCEPTANCE_TEST_ARM_CLIENT_ID_V2 }} | |
| ARM_CLIENT_SECRET: ${{ secrets.AZURE_TF_ACCEPTANCE_TEST_ARM_CLIENT_SECRET_V2 }} | |
| ARM_SUBSCRIPTION_ID: ${{ secrets.AZURE_TF_ACCEPTANCE_TEST_ARM_SUBSCRIPTION_ID_V2 }} | |
| ARM_TENANT_ID: ${{ secrets.AZURE_TF_ACCEPTANCE_TEST_ARM_TENANT_ID_V2 }} | |
| TF_VAR_cluster_name: gh-aks | |
| TF_VAR_castai_api_token: ${{ secrets.CASTAI_TOKEN }} | |
| TF_VAR_castai_api_url: ${{ secrets.CASTAI_URL }} | |
| TF_VAR_cluster_region: "germanywestcentral" | |
| TF_VAR_subscription_id: ${{ secrets.AZURE_TF_ACCEPTANCE_TEST_ARM_SUBSCRIPTION_ID_V2 }} | |
| id: aks_plan_examples | |
| run: make plan-terraform-example EXAMPLE_DIR=examples/aks/aks_cluster |