@@ -2,7 +2,7 @@ terraform {
22 required_providers {
33 meshstack = {
44 source = " meshcloud/meshstack"
5- version = " ~> 0.17.3 "
5+ version = " ~> 0.17.4 "
66 }
77 }
88}
@@ -14,6 +14,15 @@ provider "meshstack" {
1414 # apisecret = "uFOu4OjbE4JiewPxezDuemSP3DUrCYmw"
1515}
1616
17+ # Configure required providers
18+ provider "azurerm" {
19+ features {}
20+ subscription_id = local. aks_subscription_id
21+ }
22+
23+ provider "kubernetes" {
24+ }
25+
1726# Change these values according to your AKS and meshStack setup.
1827locals {
1928 # Existing AKS cluster config.
@@ -23,9 +32,9 @@ locals {
2332 aks_resource_group = " my-resource-group"
2433
2534 # meshStack workspace that will manage the platform
26- aks_platform_workspace = " platform-aks"
27- aks_location_name = " aks"
28- aks_platform_name = " aks "
35+ aks_platform_workspace = " platform-aks"
36+ aks_platform_identifier = " aks"
37+ aks_location_identifier = " global "
2938}
3039
3140# For workload identity federation config
@@ -55,21 +64,9 @@ module "aks_meshplatform" {
5564 }
5665}
5766
58- # Use a dedicated location for this platform
59- resource "meshstack_location" "aks" {
60- metadata = {
61- name = local.aks_location_name
62- }
63-
64- spec = {
65- display_name = " AKS"
66- description = " Azure Kubernetes Service"
67- }
68- }
69-
7067resource "meshstack_platform" "aks" {
7168 metadata = {
72- name = local.aks_platform_name
69+ name = local.aks_platform_identifier
7370 owned_by_workspace = local.aks_platform_workspace
7471 }
7572
@@ -78,7 +75,9 @@ resource "meshstack_platform" "aks" {
7875 display_name = " AKS Namespace"
7976 endpoint = local.aks_base_url
8077
81- location_ref = meshstack_location.aks.ref
78+ location_ref = {
79+ name = local.aks_location_identifier
80+ }
8281
8382 # This platform is available to all users
8483 availability = {
@@ -136,7 +135,7 @@ resource "meshstack_platform" "aks" {
136135
137136resource "meshstack_landingzone" "aks_default" {
138137 metadata = {
139- name = " ${ local . aks_platform_name } -default"
138+ name = " ${ local . aks_platform_identifier } -default"
140139 owned_by_workspace = local.aks_platform_workspace
141140 }
142141
0 commit comments