|
32 | 32 | type: string
|
33 | 33 | description: The k0s kube-proxy mode to test.
|
34 | 34 | default: iptables
|
35 |
| - terraform-version: |
| 35 | + tofu-version: |
36 | 36 | type: string
|
37 |
| - description: The Terraform version to use when provisioning test resources. |
38 |
| - default: 1.4.6 |
| 37 | + description: The OpenTofu version to use when provisioning test resources. |
| 38 | + default: 1.9.0 |
39 | 39 | k0sctl-version:
|
40 | 40 | type: string
|
41 | 41 | description: The k0sctl version to use when bootstrapping the test cluster.
|
@@ -96,14 +96,14 @@ jobs:
|
96 | 96 | echo KUBERNETES_VERSION="$kubernetesVersion" >>"$GITHUB_ENV"
|
97 | 97 | echo K0SCTL_VERSION="$k0sctlVersion" >>"$GITHUB_ENV"
|
98 | 98 |
|
99 |
| - - name: "Terraform :: Requisites :: Download k0s" |
| 99 | + - name: "Tofu :: Requisites :: Download k0s" |
100 | 100 | if: inputs.k0s-version == ''
|
101 | 101 | uses: actions/download-artifact@v4
|
102 | 102 | with:
|
103 | 103 | name: k0s-linux-${{ inputs.arch }}
|
104 | 104 | path: ${{ github.workspace }}/.cache
|
105 | 105 |
|
106 |
| - - name: "Terraform :: Requisites :: Prepare" |
| 106 | + - name: "Tofu :: Requisites :: Prepare" |
107 | 107 | env:
|
108 | 108 | OSTESTS_ARCH: ${{ inputs.arch }}
|
109 | 109 | K0S_VERSION: ${{ inputs.k0s-version }}
|
@@ -131,27 +131,27 @@ jobs:
|
131 | 131 | fi
|
132 | 132 | echo TF_VAR_k0s_version="$K0S_VERSION" >>"$GITHUB_ENV"
|
133 | 133 |
|
134 |
| - - name: "Terraform :: Setup" |
135 |
| - uses: hashicorp/setup-terraform@v3 |
| 134 | + - name: "Tofu :: Setup" |
| 135 | + uses: opentofu/setup-opentofu@v1 |
136 | 136 | with:
|
137 |
| - terraform_version: ${{ inputs.terraform-version }} |
138 |
| - terraform_wrapper: false |
| 137 | + tofu_version: ${{ inputs.tofu-version }} |
| 138 | + tofu_wrapper: false |
139 | 139 |
|
140 |
| - - name: "Terraform :: Init" |
| 140 | + - name: "Tofu :: Init" |
141 | 141 | id: tf-init
|
142 |
| - run: terraform init |
| 142 | + run: tofu init |
143 | 143 |
|
144 |
| - - name: "Terraform :: Apply" |
| 144 | + - name: "Tofu :: Apply" |
145 | 145 | id: tf-apply
|
146 | 146 | env:
|
147 | 147 | AWS_ACCESS_KEY_ID: ${{ secrets.aws-access-key-id }}
|
148 | 148 | AWS_SECRET_ACCESS_KEY: ${{ secrets.aws-secret-access-key }}
|
149 | 149 | AWS_SESSION_TOKEN: ${{ secrets.aws-session-token }}
|
150 | 150 | run: |
|
151 |
| - terraform apply -auto-approve |
| 151 | + tofu apply -auto-approve |
152 | 152 |
|
153 | 153 | kubeconfigPath="$GITHUB_WORKSPACE/.cache/kubeconfig"
|
154 |
| - terraform output -raw k0s_kubeconfig >"$kubeconfigPath" |
| 154 | + tofu output -raw k0s_kubeconfig >"$kubeconfigPath" |
155 | 155 | echo "KUBECONFIG=$kubeconfigPath" >>"$GITHUB_ENV"
|
156 | 156 |
|
157 | 157 | # If concurrency is enabled, tests are executed in two phases. First, all
|
@@ -209,13 +209,13 @@ jobs:
|
209 | 209 | sonobuoyTarGz="$(make --silent get-conformance-results)"
|
210 | 210 | mv -- "$sonobuoyTarGz" sonobuoy-e2e-serial.tar.gz
|
211 | 211 |
|
212 |
| - - name: "Terraform :: Destroy" |
| 212 | + - name: "Tofu :: Destroy" |
213 | 213 | if: always() && steps.tf-init.conclusion == 'success'
|
214 | 214 | env:
|
215 | 215 | AWS_ACCESS_KEY_ID: ${{ secrets.aws-access-key-id }}
|
216 | 216 | AWS_SECRET_ACCESS_KEY: ${{ secrets.aws-secret-access-key }}
|
217 | 217 | AWS_SESSION_TOKEN: ${{ secrets.aws-session-token }}
|
218 |
| - run: terraform destroy -auto-approve |
| 218 | + run: tofu destroy -auto-approve |
219 | 219 |
|
220 | 220 | - name: "e2e tests :: Upload results"
|
221 | 221 | if: always() && (steps.e2e-retrieve-parallel.conclusion == 'success' || steps.e2e-retrieve-serial.conclusion == 'success')
|
|
0 commit comments