Skip to content

Commit a957865

Browse files
authored
Merge pull request #122 from kbst/updateazurerm
Update azurerm provider and fix breaking changes
2 parents 8c44d51 + 9c53170 commit a957865

File tree

6 files changed

+13
-4
lines changed

6 files changed

+13
-4
lines changed

azurerm/_modules/aks/ingress.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ resource "azurerm_public_ip" "current" {
55
location = azurerm_kubernetes_cluster.current.location
66
resource_group_name = azurerm_kubernetes_cluster.current.node_resource_group
77
allocation_method = "Static"
8+
sku = "Standard"
89

910
tags = var.metadata_labels
1011

azurerm/_modules/aks/service_principal.tf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,5 @@ resource "random_string" "password" {
1414
resource "azuread_service_principal_password" "current" {
1515
service_principal_id = azuread_service_principal.current.id
1616
value = random_string.password.result
17-
end_date_relative = "2160h" # valid for 90 days
17+
end_date_relative = var.service_principal_end_date_relative
1818
}
19-

azurerm/_modules/aks/variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,8 @@ variable "disable_default_ingress" {
8686
type = bool
8787
description = "Whether to disable the default ingress."
8888
}
89+
90+
variable "service_principal_end_date_relative" {
91+
type = string
92+
description = "Relative time in hours for which the service principal password is valid. Defaults to 1 year."
93+
}

azurerm/cluster/configuration.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,14 @@ locals {
2525
default_node_pool_max_count = lookup(local.cfg, "default_node_pool_max_count", "1")
2626
default_node_pool_node_count = lookup(local.cfg, "default_node_pool_node_count", "1")
2727

28-
default_node_pool_vm_size = lookup(local.cfg, "default_node_pool_vm_size", "Standard_D1_v2")
28+
default_node_pool_vm_size = lookup(local.cfg, "default_node_pool_vm_size", "Standard_B2s")
2929

3030
default_node_pool_os_disk_size_gb = lookup(local.cfg, "default_node_pool_os_disk_size_gb", "30")
3131

3232
manifest_path_default = "manifests/overlays/${terraform.workspace}"
3333
manifest_path = var.manifest_path != null ? var.manifest_path : local.manifest_path_default
3434

3535
disable_default_ingress = lookup(local.cfg, "disable_default_ingress", false)
36+
37+
service_principal_end_date_relative = lookup(local.cfg, "service_principal_end_date_relative", "8766h")
3638
}

azurerm/cluster/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,6 @@ module "cluster" {
4141
manifest_path = local.manifest_path
4242

4343
disable_default_ingress = local.disable_default_ingress
44+
45+
service_principal_end_date_relative = local.service_principal_end_date_relative
4446
}

azurerm/cluster/providers.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ provider "external" {
55

66
# https://github.com/terraform-providers/terraform-provider-azurerm/releases
77
provider "azurerm" {
8-
version = "~> 2.13.0"
8+
version = "~> 2.23.0"
99

1010
features {}
1111
}

0 commit comments

Comments
 (0)