Skip to content

Commit d0fdb41

Browse files
committed
use aws_eks_cluster_versions data source for latest version
1 parent d0b1672 commit d0fdb41

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
data "aws_region" "current" {}
2+
3+
data "aws_eks_cluster_versions" "latest" {
4+
default_only = true
5+
}

terraform/aws/aws-eks-operator/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ locals {
1010
subnet_ids = module.vpc.private_subnets
1111

1212
# EKS cluster configuration
13-
cluster_version = "1.34" # TODO: omit this?
13+
cluster_version = data.aws_eks_cluster_versions.latest.cluster_versions[0].cluster_version
1414
node_instance_type = "t3.medium"
1515
desired_size = 2
1616
max_size = 2
@@ -26,7 +26,7 @@ locals {
2626
ha_proxy_service_name = "${helm_release.tailscale_operator.name}-ha"
2727
}
2828

29-
# This isn't required but helps avoid Let's Encrypt throttling to make testing and iterating easier.
29+
# This isn't required but helps avoid conflicts and Let's Encrypt throttling to make testing and iterating easier.
3030
resource "random_string" "operator_name_suffix" {
3131
length = 3
3232
numeric = false

0 commit comments

Comments
 (0)