Skip to content

chechiachang/terraform-azure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform for Azure Cloud

This repository manage my azure resources with terraform and terragrunt. For user not using terragrunt, check our archived version terraform-azure

Client Version

terraform 0.13.5 terragrunt 0.26.0

Usage

NEW_PROJECT_NAME=my-awesome-azure

cp -r chechia ${NEW_PROJECT_NAME}
# cd to base/dev/staging/prod environment
cd ${NEW_PROJECT_NAME}/base/foundation

Edit environments

  • resource group name
  • storage account name
  • storage container name
vim env.tfvars

az login
az account list

az account set --subscription="SUBSCRIPTION_ID"
export SUBSCRIPTION_ID="SUBSCRIPTION_ID"

terragrunt init && terragrunt plan

First time? Let's Get-Started!

Install tools

config Azure cli

Azure doc: get started with azure cli

This project use credential from azure-cli.

az login

Create resource group, storage account, and storage blob container

Azure doc: create storage account

Azure doc: Configure storage account

RESOURCE_GROUP_NAME=base
LOCATION=southeastasia

az group create \
  --name ${RESOURCE_GROUP_NAME} \
  --location ${LOCATION}

STORAGE_ACCOUNT_NAME=""

az storage account create \
  --name ${STORAGE_ACCOUNT_NAME} \
  --resource-group ${RESOURCE_GROUP_NAME} \
  --location ${LOCATION} \
  --sku Standard_LRS \
  --kind StorageV2

CONTAINER_NAME=base

az storage container create \
    --account-name ${STORAGE_ACCOUNT_NAME} \
    --name ${CONTAINER_NAME} \
    --auth-mode login

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published