-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(setup): setup.azcli for blob account for terraform statefile, #1
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Configuration | ||
# ------------- | ||
|
||
export AZ_GOVDEMO_RG_NAME=public-demos-tfstate-rg | ||
export AZ_GOVDEMO_STORAGEACCT_NAME=govdemo # must be globally unique | ||
export AZ_GOVDEMO_LOCATION=eastus | ||
|
||
|
||
# Resource Group | ||
# -------------- | ||
# Create a dedicated resource group | ||
# Configurable: name, location | ||
az group create \ | ||
--name $AZ_GOVDEMO_RG_NAME \ | ||
--location $AZ_GOVDEMO_LOCATION | ||
|
||
|
||
# Storage Account | ||
# --------------- | ||
# This holds your actual Terraform state file | ||
|
||
az storage account create \ | ||
--name $AZ_GOVDEMO_STORAGEACCT_NAME \ | ||
--resource-group $AZ_GOVDEMO_RG_NAME \ | ||
--kind StorageV2 \ | ||
--sku Standard_LRS \ | ||
--https-only true \ | ||
--allow-blob-public-access false \ | ||
--tags "demo=e2e-governance" | ||
|
||
# Blobs always need a parent container, so we'll create one | ||
az storage container create \ | ||
--name terraform \ | ||
--account-name $AZ_GOVDEMO_STORAGEACCT_NAME \ | ||
--public-acces off \ | ||
--auth-mode login |