Skip to content

Commit 0b1ca87

Browse files
authored
Update go and terraform in test environment (#384)
* Update go and terraform in test environment * Test against latest provider versions * Increase fargate delete timout * Add some retry logic to cleanup phase
1 parent 458151e commit 0b1ca87

File tree

6 files changed

+55
-40
lines changed

6 files changed

+55
-40
lines changed

.github/actions/terratest/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
FROM golang:1.22-alpine3.19
1+
FROM golang:1.24.1-alpine3.20
22

33
WORKDIR /
44

5-
ARG TERRAFORM_VERSION=1.8.1
6-
ARG KUBECTL_VERSION=1.28.11
7-
ARG HELM_VERSION=3.15.3
5+
ARG TERRAFORM_VERSION=1.11.3
6+
ARG KUBECTL_VERSION=1.32.3
7+
ARG HELM_VERSION=3.17.0
88

99
RUN apk add --no-cache \
1010
bash \

.terraform-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.8.1
1+
1.11.3

examples/cluster/.terraform.lock.hcl

Lines changed: 35 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

fargate.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ resource "aws_eks_fargate_profile" "critical_pods" {
1212
labels = {}
1313
}
1414
}
15+
16+
timeouts {
17+
create = "10m"
18+
delete = "20m"
19+
}
1520
}
1621

1722
resource "aws_iam_role" "fargate" {

modules/karpenter/fargate.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,9 @@ resource "aws_eks_fargate_profile" "critical_pods" {
88
namespace = "karpenter"
99
labels = {}
1010
}
11+
12+
timeouts {
13+
create = "10m"
14+
delete = "20m"
15+
}
1116
}

test/common.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ func deployTerraform(t *testing.T, workingDir string, vars map[string]interface{
4747

4848
func cleanupTerraform(t *testing.T, workingDir string) {
4949
terraformOptions := test_structure.LoadTerraformOptions(t, workingDir)
50+
terraformOptions.RetryableTerraformErrors = map[string]string{
51+
".*operation error EKS: DeleteFargateProfile.*": "Fargate delete failed",
52+
}
53+
terraformOptions.MaxRetries = 5
54+
terraformOptions.TimeBetweenRetries = time.Minute
5055
terraform.Destroy(t, terraformOptions)
5156
test_structure.CleanupTestDataFolder(t, workingDir)
5257
}

0 commit comments

Comments
 (0)