Skip to content

Commit

Permalink
Update to Azure Linux (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Augspurger authored Oct 30, 2023
1 parent b0471ea commit 35dd74c
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 32 deletions.
30 changes: 8 additions & 22 deletions deployment/terraform/resources/aks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,23 @@ resource "azurerm_kubernetes_cluster" "pc" {
dns_prefix = "${local.prefix}-cluster"
kubernetes_version = var.k8s_version

addon_profile {
kube_dashboard {
enabled = false
}
}

default_node_pool {
name = "agentpool"
vm_size = "Standard_DS2_v2"
node_count = var.aks_node_count
vnet_subnet_id = azurerm_subnet.node_subnet.id
name = "agentpool"
os_sku = "AzureLinux"
vm_size = "Standard_DS2_v2"
node_count = var.aks_node_count
vnet_subnet_id = azurerm_subnet.node_subnet.id
orchestrator_version = var.k8s_version
}

identity {
type = "SystemAssigned"
}

role_based_access_control {
enabled = true
azure_active_directory {
managed = true
azure_rbac_enabled = true
}

azure_active_directory_role_based_access_control {
managed = true
azure_rbac_enabled = true
}
# TODO(azurerm 3.x)
# azure_active_directory_role_based_access_control {
# managed = true
# azure_rbac_enabled = true
# }

tags = {
Environment = var.environment
Expand Down
3 changes: 2 additions & 1 deletion deployment/terraform/resources/ip.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ resource "azurerm_public_ip" "pc" {
location = azurerm_resource_group.pc.location
allocation_method = "Static"
sku = "Standard"
zones = ["1", "2", "3"]

tags = {
environment = var.environment
Expand All @@ -17,4 +18,4 @@ resource "azurerm_public_ip" "pc" {
tags,
]
}
}
}
2 changes: 1 addition & 1 deletion deployment/terraform/resources/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "2.74.0"
version = "3.77.0"
}
}
}
15 changes: 8 additions & 7 deletions deployment/terraform/resources/storage_account.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
resource "azurerm_storage_account" "pc" {
name = "${local.nodash_prefix}sa"
resource_group_name = azurerm_resource_group.pc.name
location = azurerm_resource_group.pc.location
account_tier = "Standard"
account_replication_type = "LRS"
min_tls_version = "TLS1_2"
name = "${local.nodash_prefix}sa"
resource_group_name = azurerm_resource_group.pc.name
location = azurerm_resource_group.pc.location
account_tier = "Standard"
account_replication_type = "LRS"
min_tls_version = "TLS1_2"
allow_nested_items_to_be_public = false
}

# Tables
Expand All @@ -22,4 +23,4 @@ resource "azurerm_storage_table" "containerconfig" {
resource "azurerm_storage_table" "ipexceptionlist" {
name = "ipexceptionlist"
storage_account_name = azurerm_storage_account.pc.name
}
}
2 changes: 1 addition & 1 deletion deployment/terraform/staging/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module "resources" {
environment = "staging"
region = "West Europe"

k8s_version = "1.25.5"
k8s_version = "1.25.6"

cluster_cert_issuer = "letsencrypt"
cluster_cert_server = "https://acme-v02.api.letsencrypt.org/directory"
Expand Down

0 comments on commit 35dd74c

Please sign in to comment.