diff --git a/quickstart/101-aks-edge-zone/main.tf b/quickstart/101-aks-edge-zone/main.tf new file mode 100644 index 000000000..830e413e7 --- /dev/null +++ b/quickstart/101-aks-edge-zone/main.tf @@ -0,0 +1,35 @@ +resource "random_pet" "rg_name" { + prefix = var.resource_group_name_prefix +} + +resource "azurerm_resource_group" "rg" { + location = var.resource_group_location + name = random_pet.rg_name.id +} + +resource "random_string" "aks_cluster_name" { + length = 12 + special = false +} + +resource "azurerm_kubernetes_cluster" "aks_cluster" { + name = random_string.aks_cluster_name.result + location = azurerm_resource_group.rg.location + resource_group_name = azurerm_resource_group.rg.name + dns_prefix = "myakscluster" + edge_zone = var.edge_zone + + default_node_pool { + name = "default" + node_count = 1 + vm_size = "Standard_DS2_v2" + } + + identity { + type = "SystemAssigned" + } + + tags = { + Environment = "Production" + } +} \ No newline at end of file diff --git a/quickstart/101-aks-edge-zone/outputs.tf b/quickstart/101-aks-edge-zone/outputs.tf new file mode 100644 index 000000000..c228fb3ec --- /dev/null +++ b/quickstart/101-aks-edge-zone/outputs.tf @@ -0,0 +1,7 @@ +output "resource_group_name" { + value = azurerm_resource_group.rg.name +} + +output "aks_cluster_name" { + value = random_string.aks_cluster_name.result +} diff --git a/quickstart/101-aks-edge-zone/providers.tf b/quickstart/101-aks-edge-zone/providers.tf new file mode 100644 index 000000000..7261b1fb4 --- /dev/null +++ b/quickstart/101-aks-edge-zone/providers.tf @@ -0,0 +1,16 @@ +terraform { + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "~>3.0" + } + random = { + source = "hashicorp/random" + version = "~>3.0" + } + } +} + +provider "azurerm" { + features {} +} \ No newline at end of file diff --git a/quickstart/101-aks-edge-zone/variables.tf b/quickstart/101-aks-edge-zone/variables.tf new file mode 100644 index 000000000..e8b0facb1 --- /dev/null +++ b/quickstart/101-aks-edge-zone/variables.tf @@ -0,0 +1,17 @@ +variable "resource_group_location" { + type = string + default = "Central US" + description = "Location of the resource group." +} + +variable "resource_group_name_prefix" { + type = string + default = "rg" + description = "Prefix of the resource group name that's combined with a random ID so name is unique in your Azure subscription." +} + +variable "edge_zone" { + type = string + default = "attdetroit1" + description = "Name of the edge zone." +}