Create Azure AKS Infrastructure for Jaseci using Terraform
Preparation
- Make sure you have a valid Azure Account.
- Create a service principal from https://learn.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal
- Connect your local computer to azure using your service principal credentials "az login --service-principal -u < appID > -p < PASSWORD > --tenant < tenantID >"
- Install terraform CLI from https://www.terraform.io/downloads
- Update the config.tf file with respective key values as described and related configuiration of cluster as needed
- Update environment.auto.tfvars file with your Azure Service Principal details.
Initilaize
Run below commoand to initialize your terraform
Terraform init
Plan - To check if all Configuration is properly Set
Terraform plan
Apply - Get Set Go, Create jaseci Cluster
Terraform apply
Destroy - if you need to delete the infrastructure, you can use below command
Terraform destroy
NOTE
By default terraform runs on default workspace which adds dev environment to the cluster suffix. If you want to create multiple environment , for example prod , add Prod related values in config.tf
Workspace can be created and switched using below command
terraform workspace new <environment-Name>
or you can select when you want to run updates on any environmnet using
terraform workspace select <environment-Name>