Skip to content

bradmccoydev/aks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

passing GitHub

AKS Labs

This repo is used for our Azure Kubernetes Service Labs mostly in the Microsoft Reactor and Hashicorp community group

Video Links

Blog Links

Get free azure account

https://azure.microsoft.com/en-us/free/

Configure Azure for Terraform State File

If you look at the src/provider.tf file. you will see that we are using an Azure backend to store state. If you want an Azure backend you can add a storage account with the commands below otherwise remove the backend params and you can use local state.

Export variable with your own distinct name export STORAGE_ACCOUNT_NAME=aksreactorlab123

Create Resource Group az group create --location australiaeast --name terraformstate

Create Storage Account az storage account create --name $STORAGE_ACCOUNT_NAME --resource-group terraformstate --location australiaeast --sku Standard_LRS

Create Storage Container az storage container create --name reactorlab --account-name $STORAGE_ACCOUNT_NAME

Now the Storage account and container are created you need to update the terraform provider.tf with the values (storage_account_name, and container_name)

Provision Infra with Terraform

  1. Terraform init terraform init -var-file=deployment/devops.tfvars -backend-config="resource_group_name=Ortelius-administrator" -backend-config="storage_account_name=orteliusinfrastate" -backend-config="container_name=prod" -backend-config="key=prod.tfstate"

  2. Terraform Plan terraform plan -var-file=deployment/devops.tfvars

  3. Terraform Apply terraform apply -var-file=deployment/devops.tfvars

About

Terraform Code For Azure Kubernetes Service

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages