-
Notifications
You must be signed in to change notification settings - Fork 42
73 lines (64 loc) · 2.65 KB
/
examples.yml
File metadata and controls
73 lines (64 loc) · 2.65 KB
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
65
66
67
68
69
70
71
72
73
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@v6
- name: Set up Terraform
uses: hashicorp/setup-terraform@v4
with:
terraform_version: ${{ matrix.version }}
- name: Print tf version
run: terraform version
- name: Setup Go 1.24.0
uses: actions/setup-go@v6
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