Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Breaking] Add validation block to enforce users to change sku_tier from Paid to Standard. #346

Merged
merged 1 commit into from
Apr 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/multiple_node_pools/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ module "aks" {
prefix = "prefix-${random_id.prefix.hex}"
resource_group_name = local.resource_group.name
os_disk_size_gb = 60
sku_tier = "Paid"
sku_tier = "Standard"
rbac_aad = false
vnet_subnet_id = azurerm_subnet.test.id
node_pools = local.nodes
Expand Down
2 changes: 1 addition & 1 deletion examples/multiple_node_pools/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">= 3.40, < 4.0"
version = ">= 3.51, < 4.0"
}
random = {
source = "hashicorp/random"
Expand Down
2 changes: 1 addition & 1 deletion examples/named_cluster/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">=3.40.0, < 4.0"
version = ">=3.51.0, < 4.0"
}
curl = {
source = "anschoewe/curl"
Expand Down
2 changes: 1 addition & 1 deletion examples/startup/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ module "aks" {
rbac_aad = true
rbac_aad_managed = true
role_based_access_control_enabled = true
sku_tier = "Paid"
sku_tier = "Standard"
vnet_subnet_id = azurerm_subnet.test.id

agents_labels = {
Expand Down
2 changes: 1 addition & 1 deletion examples/startup/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">= 3.40, < 4.0"
version = ">= 3.51, < 4.0"
}
curl = {
source = "anschoewe/curl"
Expand Down
2 changes: 1 addition & 1 deletion examples/with_acr/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ module "aks" {
network_plugin = "azure"
network_policy = "azure"
os_disk_size_gb = 60
sku_tier = "Paid"
sku_tier = "Standard"
rbac_aad = false
vnet_subnet_id = azurerm_subnet.test.id
}
2 changes: 1 addition & 1 deletion examples/with_acr/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">= 3.40, < 4.0"
version = ">= 3.51, < 4.0"
}
random = {
source = "hashicorp/random"
Expand Down
2 changes: 1 addition & 1 deletion examples/without_monitor/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">= 3.40, < 4.0"
version = ">= 3.51, < 4.0"
}
curl = {
source = "anschoewe/curl"
Expand Down
6 changes: 5 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -1042,8 +1042,12 @@ variable "secret_rotation_interval" {

variable "sku_tier" {
type = string
description = "The SKU Tier that should be used for this Kubernetes Cluster. Possible values are `Free` and `Paid`"
description = "The SKU Tier that should be used for this Kubernetes Cluster. Possible values are `Free` and `Standard`"
default = "Free"
validation {
condition = contains(["Free", "Standard"], var.sku_tier)
error_message = "The SKU Tier must be either `Free` or `Standard`. `Paid` is no longer supported since AzureRM provider v3.51.0."
}
}

variable "storage_profile_blob_driver_enabled" {
Expand Down
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">= 3.47.0, < 4.0"
version = ">= 3.51.0, < 4.0"
}
tls = {
source = "hashicorp/tls"
Expand Down