- This is a POC!!! Not ready for production!
- Yes, the state is savable... But it's not done and there is no strategy in place
- Even if the state is saved it might not be good for anything if MS make changes to AKS such as removing the version of Kubernetes which is used... as it was done with 1.11.5
- This file contains quite a few todo items... That's for a reason!
https://azure.microsoft.com/da-dk/pricing/details/virtual-machines/linux/#d-series
https://github.com/lawrencegripper/azure-aks-terraform#least-privilidge
- azurerm_kubernetes_cluster.k8s: Error creating/updating Managed Kubernetes Cluster "tons" (Resource Group "k8s-rg"): containerservice.ManagedClustersClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: Code="ServicePrincipalNotFound" Message="Service principal clientID: 8784b2fe-8de5-4a6b-b748-77d4a6c12090 not found in Active Directory tenant 6558925e-31cb-442f-88e0-3b0c475d4e38, Please see https://aka.ms/acs-sp-help for more details."
Consider how to deal with multiple environments in terms of create-azure-ad-server-app.sh and create-azure-ad-client-app.sh
Use terraform workspaces to name resources. All name properties should be post fixed with -workspace-name
tags { Environment = "${terraform.workspace}" }
Also use $var.name_prefix for all names. Eg. $var.name_prefix + name + $terraform.workspace
https://docs.microsoft.com/en-us/azure/aks/aad-integration
https://docs.microsoft.com/en-us/cli/azure/ad/group?view=azure-cli-latest
!!!Create rolebindings and roles using object id's from the above commands
Extend create-azure-ad-groups.sh to also cover dashboard, dashboard-reader and other groups
Possible a script for creating new group (for new projects start)
Use workspace postfix when creating AD groups... Or something. Consider how to handle dev, prod etc.
https://github.com/underguiz/terraform-aks-autoscaler
https://docs.microsoft.com/en-us/azure/terraform/terraform-backend
https://github.com/tolitius/cault https://learn.hashicorp.com/vault/getting-started/install https://github.com/hashicorp/terraform-guides/blob/master/infrastructure-as-code/k8s-cluster-aks/main.tf