Skip to content

Commit

Permalink
feat: Upgrade EKS Terraform to 1.30 (#697)
Browse files Browse the repository at this point in the history
  • Loading branch information
niallthomson authored Dec 13, 2024
1 parent 2a19f9f commit 5b13828
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 25 deletions.
2 changes: 0 additions & 2 deletions deploy/terraform/eks/default/data.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
data "aws_region" "current" {}

data "aws_eks_cluster_auth" "this" {
name = module.retail_app_eks.eks_cluster_id

Expand Down
2 changes: 1 addition & 1 deletion deploy/terraform/eks/default/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ module "retail_app_eks" {
}

environment_name = var.environment_name
cluster_version = "1.28"
cluster_version = "1.30"
vpc_id = module.vpc.inner.vpc_id
vpc_cidr = module.vpc.inner.vpc_cidr_block
subnet_ids = module.vpc.inner.private_subnets
Expand Down
2 changes: 1 addition & 1 deletion deploy/terraform/eks/default/opentelemetry.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ resource "kubectl_manifest" "otel_instrumentation" {
"kind" = "Instrumentation"
"metadata" = {
"name" = "default-instrumentation"
"namespace" = "${module.retail_app_eks.adot_namespace}"
"namespace" = module.retail_app_eks.adot_namespace
}
"spec" = {
"env" = [
Expand Down
5 changes: 3 additions & 2 deletions deploy/terraform/eks/default/variables.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
variable "environment_name" {
type = string
default = "retail-store"
description = "Name of the environment"
type = string
default = "retail-store"
}

variable "istio_enabled" {
Expand Down
2 changes: 0 additions & 2 deletions deploy/terraform/eks/minimal/data.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
data "aws_region" "current" {}

data "aws_eks_cluster_auth" "this" {
name = module.retail_app_eks.eks_cluster_id

Expand Down
2 changes: 1 addition & 1 deletion deploy/terraform/eks/minimal/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module "retail_app_eks" {
}

environment_name = var.environment_name
cluster_version = "1.28"
cluster_version = "1.30"
vpc_id = module.vpc.inner.vpc_id
vpc_cidr = module.vpc.inner.vpc_cidr_block
subnet_ids = module.vpc.inner.private_subnets
Expand Down
2 changes: 1 addition & 1 deletion deploy/terraform/eks/minimal/providers.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
source = "hashicorp/aws"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down
5 changes: 3 additions & 2 deletions deploy/terraform/eks/minimal/variables.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
variable "environment_name" {
type = string
default = "retail-store"
description = "Name of the environment"
type = string
default = "retail-store"
}

variable "istio_enabled" {
Expand Down
1 change: 0 additions & 1 deletion deploy/terraform/lib/eks/adot.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ resource "kubernetes_namespace_v1" "adot" {
resource "aws_eks_addon" "adot" {
cluster_name = module.eks_cluster.cluster_name
addon_name = "adot"
addon_version = "v0.94.1-eksbuild.1"
resolve_conflicts_on_create = "OVERWRITE"
resolve_conflicts_on_update = "OVERWRITE"
preserve = false
Expand Down
6 changes: 0 additions & 6 deletions deploy/terraform/lib/eks/data.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
data "aws_eks_cluster_auth" "this" {
name = module.eks_cluster.cluster_name
}

data "aws_availability_zones" "available" {}

data "aws_region" "current" {}

data "aws_partition" "current" {}
3 changes: 2 additions & 1 deletion deploy/terraform/lib/eks/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@ output "configure_kubectl" {
}

output "adot_namespace" {
value = kubernetes_namespace_v1.adot.metadata[0].name
description = "Namespace where ADOT is deployed"
value = kubernetes_namespace_v1.adot.metadata[0].name
}
6 changes: 4 additions & 2 deletions deploy/terraform/lib/eks/variables.tf
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
variable "environment_name" {
type = string
description = "Name of the environment"
type = string
}

variable "cluster_version" {
description = "EKS cluster version."
type = string
default = "1.29"
default = "1.30"
}

variable "tags" {
description = "List of tags to be associated with resources."
default = {}
type = map(string)
}

variable "vpc_id" {
Expand Down
6 changes: 3 additions & 3 deletions deploy/terraform/lib/eks/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ terraform {
version = ">= 4.48"
}
kubernetes = {
source = "hashicorp/kubernetes"
version = ">= 2.10"
configuration_aliases = [ kubernetes.cluster, kubernetes.addons ]
source = "hashicorp/kubernetes"
version = ">= 2.10"
configuration_aliases = [kubernetes.cluster, kubernetes.addons]
}
helm = {
source = "hashicorp/helm"
Expand Down

0 comments on commit 5b13828

Please sign in to comment.