diff --git a/README.md b/README.md
index f69dbeb..ae1b7fc 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@
```terraform
module "as_demo" {
- source = "git@github.com:AxonIQ/terraform-axonserver-k8s.git?ref=v1.11"
+ source = "git@github.com:AxonIQ/terraform-axonserver-k8s.git?ref=v1.12"
axonserver_release = "2024.1.1"
java_version = "17"
@@ -46,8 +46,8 @@ module "as_demo" {
| [public\_domain](#input\_public\_domain) | The domain that is added to the hostname when returning hostnames to client applications. | `string` | `""` | yes |
| [axonserver\_license\_path](#input\_axonserver\_license\_path) | The path to the Axon Server license | `string` | `""` | yes |
| [axonserver\_properties](#input\_axonserver\_properties) | The path to the Axon Server properties file | `string` | `""` | no |
-| [console\_authentication](#input\_console\_authentication) | Console authentication token | `string` | `""` | no |
-| [java\_version](#input\_java\_version) | Java runtime | `number` | `"11"` | no |
+| [console\_authentication](#input\_console\_authentication) | Console authentication token | `string` | `""` | no |
+| [java\_version](#input\_java\_version) | Java runtime | `number` | `"17"` | no |
| [resources\_limits\_cpu](#input\_resources\_limits\_cpu) | spec.container.resources.limits.cpu | `number` | `"1"` | no |
| [resources\_limits\_memory](#input\_resources\_limits\_memory) | spec.container.resources.limits.memory | `string` | `"1Gi"` | no |
| [resources\_requests\_cpu](#input\_resources\_requests\_cpu) | spec.container.resources.requests.cpu | `number` | `"1"` | no |
diff --git a/statefulset.tf b/statefulset.tf
index c7ead5c..695f0df 100755
--- a/statefulset.tf
+++ b/statefulset.tf
@@ -34,7 +34,7 @@ resource "kubernetes_stateful_set" "axonserver" {
termination_grace_period_seconds = 120
dynamic "affinity" {
- for_each = var.assign_pods_to_different_nodes == true ? [1] : [ ]
+ for_each = var.assign_pods_to_different_nodes == true ? [1] : []
content {
pod_anti_affinity {
preferred_during_scheduling_ignored_during_execution {
@@ -47,7 +47,7 @@ resource "kubernetes_stateful_set" "axonserver" {
match_expressions {
key = "cluster"
operator = "In"
- values = [ var.cluster_name ]
+ values = [var.cluster_name]
}
}
}
diff --git a/variables.tf b/variables.tf
index a5f324e..e2c9e65 100755
--- a/variables.tf
+++ b/variables.tf
@@ -43,7 +43,12 @@ variable "console_authentication" {
variable "java_version" {
description = "Java runtime"
type = number
- default = 11
+ default = 17
+
+ validation {
+ condition = contains(["17", "11"], var.java_version)
+ error_message = "The Java version is not supported, it must be either '17' or '11'."
+ }
}
variable "resources_limits_cpu" {