-
Notifications
You must be signed in to change notification settings - Fork 35
64 lines (57 loc) · 2.54 KB
/
examples.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Terraform Examples Validation
on:
pull_request:
branches: [ '*' ]
paths-ignore:
- '**.md.tmpl'
jobs:
terraform_validation:
strategy:
matrix:
version: [1.0, 1.2, 1.3, 1.4, 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: Validate Terraform examples
id: validate_examples
run: make validate-terraform-examples
- name: Ensure EKS module compatible
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: cd examples/eks/eks_clusters && terraform plan 1> /dev/null
- name: Ensure GKE module compatible
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: cd examples/gke/gke_castai_iam && terraform plan 1> /dev/null
- name: Ensure AKS module compatible
env:
ARM_CLIENT_ID: ${{ secrets.AZURE_TF_ACCEPTANCE_TEST_ARM_CLIENT_ID }}
ARM_CLIENT_SECRET: ${{ secrets.AZURE_TF_ACCEPTANCE_TEST_ARM_CLIENT_SECRET }}
ARM_SUBSCRIPTION_ID: ${{ secrets.AZURE_TF_ACCEPTANCE_TEST_ARM_SUBSCRIPTION_ID }}
ARM_TENANT_ID: ${{ secrets.AZURE_TF_ACCEPTANCE_TEST_ARM_TENANT_ID }}
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 }}
id: aks_plan_examples
run: cd examples/aks/aks_cluster && terraform plan 1> /dev/null