{"id":18424210,"url":"https://github.com/bradmccoydev/aks","last_synced_at":"2025-04-13T16:20:01.549Z","repository":{"id":38183938,"uuid":"360107725","full_name":"bradmccoydev/aks","owner":"bradmccoydev","description":"Terraform Code For Azure Kubernetes Service","archived":false,"fork":false,"pushed_at":"2023-04-27T12:19:46.000Z","size":115,"stargazers_count":10,"open_issues_count":0,"forks_count":17,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-16T07:44:15.249Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bradmccoydev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"bradmccoydev"}},"created_at":"2021-04-21T09:23:17.000Z","updated_at":"2024-06-22T23:55:47.000Z","dependencies_parsed_at":"2024-11-06T04:41:56.571Z","dependency_job_id":"cf91bf6f-f5ec-4f83-9fe8-1a10b539a41e","html_url":"https://github.com/bradmccoydev/aks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradmccoydev%2Faks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradmccoydev%2Faks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradmccoydev%2Faks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradmccoydev%2Faks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bradmccoydev","download_url":"https://codeload.github.com/bradmccoydev/aks/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248741549,"owners_count":21154333,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T04:41:44.599Z","updated_at":"2025-04-13T16:20:01.525Z","avatar_url":"https://github.com/bradmccoydev.png","language":"HCL","funding_links":["https://github.com/sponsors/bradmccoydev"],"categories":[],"sub_categories":[],"readme":"![passing](https://github.com/bradmccoydev/aks/actions/workflows/ci.yml/badge.svg) ![GitHub](https://img.shields.io/github/license/bradmccoydev/aks)\r\n# AKS Labs\r\nThis repo is used for our Azure Kubernetes Service Labs mostly in the Microsoft Reactor and Hashicorp community group\r\n\r\n## Video Links\r\n* [Hasicorp Community - Creating an AKS Cluster with Terraform](https://www.youtube.com/watch?v=K7Ku6p3nI_c)\r\n* [Implementing Azure Front Door with Multi-Region AKS Clusters - Part 1](https://www.youtube.com/watch?v=wMwsCeFdwnI)\r\n* [Implementing Azure Front Door with Multi-Region AKS Clusters - Part 2](https://www.youtube.com/watch?v=f4q1TqwsX_k)\r\n* [Mircosoft Reactor Lab - Deploying .NET 5 Microservices to AKS](https://www.youtube.com/watch?v=BLu8swd2i_g)\r\n\r\n## Blog Links\r\n* [How to get Certified in Terraform](https://blog.bradmccoy.io/devops-journey-how-to-get-certified-in-terraform-c0bce1caa3d)\r\n* [Deploying .NET Microservices using Terraform and Helm](https://blog.bradmccoy.io/deploying-net-5-microservices-to-aks-using-terraform-and-helm-f64d026b1569)\r\n\r\n## Get free azure account\r\nhttps://azure.microsoft.com/en-us/free/\r\n\r\n## Configure Azure for Terraform State File\r\nIf 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.\r\n\r\nExport variable with your own distinct name\r\n``` export STORAGE_ACCOUNT_NAME=aksreactorlab123 ```\r\n\r\nCreate Resource Group\r\n``` az group create --location australiaeast --name terraformstate ```\r\n\r\nCreate Storage Account\r\n``` az storage account create --name $STORAGE_ACCOUNT_NAME --resource-group terraformstate --location australiaeast --sku Standard_LRS ```\r\n\r\nCreate Storage Container\r\n``` az storage container create --name reactorlab --account-name $STORAGE_ACCOUNT_NAME ```\r\n\r\nNow the Storage account and container are created you need to update the terraform provider.tf with the values (storage_account_name, and container_name)\r\n\r\n## Provision Infra with Terraform\r\n\r\n1. Terraform init\r\n``` 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\"  ```\r\n\r\n3. Terraform Plan\r\n``` terraform plan -var-file=deployment/devops.tfvars ```\r\n\r\n4. Terraform Apply\r\n``` terraform apply -var-file=deployment/devops.tfvars ```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbradmccoydev%2Faks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbradmccoydev%2Faks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbradmccoydev%2Faks/lists"}