diff --git a/examples/basic/main.tf b/examples/basic/main.tf index ddeb63b..9320d8b 100644 --- a/examples/basic/main.tf +++ b/examples/basic/main.tf @@ -13,7 +13,7 @@ locals { # version used for both main AKS API service, and default node pool # https://github.com/Azure/AKS/releases # az aks get-versions --location uksouth --output table - kubernetes_version = "1.17.16" + kubernetes_version = "1.18.14" location = "uksouth" resource_group_name = "${random_string.aks.result}-rg-azurerm-kubernetes-cluster" name = "${random_string.aks.result}-aks-cluster" diff --git a/main.tf b/main.tf index d286c8a..d9e7448 100644 --- a/main.tf +++ b/main.tf @@ -1,24 +1,3 @@ -terraform { - # versioning syntax: https://www.terraform.io/docs/configuration/version-constraints.html#version-constraint-syntax - required_version = ">= 0.12" - - # providers (pin all versions) - # versioning syntax: https://www.terraform.io/docs/configuration/modules.html#module-versions - # ~> 1.0 = 1.x - required_providers { - # https://github.com/terraform-providers/terraform-provider-azuread/releases - azuread = "~> 1.0" - random = "~> 2.2" - tls = "~> 2.1" - } -} - -# https://github.com/terraform-providers/terraform-provider-azurerm/releases -provider "azurerm" { - version = "~> 2.20" - features {} -} - locals { # TODO: consider moving defaults to object var, as per: https://binx.io/blog/2020/01/02/module-parameter-defaults-with-the-terraform-object-type/ default_agent_profile = { diff --git a/test/README.md b/test/README.md index ab95562..3a0982d 100644 --- a/test/README.md +++ b/test/README.md @@ -20,10 +20,7 @@ cd test terraform init terraform validate -# Plan -terraform plan - -# Apply +# Plan / Apply terraform apply # Outputs diff --git a/test/main.tf b/test/main.tf index 8d6e7d3..42389c5 100644 --- a/test/main.tf +++ b/test/main.tf @@ -1,14 +1,9 @@ # Test AKS module -provider "azurerm" { - version = "2.47.0" - features {} -} - locals { # version used for both main AKS API service, and default node pool # https://github.com/Azure/AKS/releases # az aks get-versions --location uksouth --output table - kubernetes_version = "1.17.16" + kubernetes_version = "1.18.14" prefix = "rush" location = "uksouth" resource_group_name = "${local.prefix}-rg-azurerm-kubernetes-cluster" diff --git a/test/versions.tf b/test/versions.tf new file mode 100644 index 0000000..d2fda6e --- /dev/null +++ b/test/versions.tf @@ -0,0 +1,14 @@ +terraform { + required_version = ">= 0.13" + + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "2.53.0" + } + } +} + +provider "azurerm" { + features {} +} diff --git a/variables.tf b/variables.tf index c15e030..b708d55 100644 --- a/variables.tf +++ b/variables.tf @@ -24,7 +24,7 @@ variable "aks_admin_group_member_name" { variable "kubernetes_version" { description = "Version for both main AKS API service, and default node pool" type = string - default = "1.17.16" + default = "1.18.14" } variable "sla_sku" { diff --git a/versions.tf b/versions.tf new file mode 100644 index 0000000..9a55706 --- /dev/null +++ b/versions.tf @@ -0,0 +1,35 @@ +terraform { + # versioning syntax: https://www.terraform.io/docs/configuration/version-constraints.html#version-constraint-syntax + required_version = ">= 0.13" + + # versioning syntax: https://www.terraform.io/docs/configuration/modules.html#module-versions + # ~> 1.0 = 1.x + required_providers { + + # https://github.com/terraform-providers/terraform-provider-azurerm/releases + azurerm = { + source = "hashicorp/azurerm" + version = "~> 2.0" + } + + # https://github.com/terraform-providers/terraform-provider-azuread/releases + azuread = { + source = "hashicorp/azuread" + version = "~> 1.0" + } + + random = { + source = "hashicorp/random" + version = "~> 2.0" + } + + tls = { + source = "hashicorp/tls" + version = "~> 2.0" + } + } +} + +provider "azurerm" { + features {} +}