Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/evry-ace/azure-iac-demo
Infrastructure as Code Demonstration for Azure
https://github.com/evry-ace/azure-iac-demo
Last synced: about 2 months ago
JSON representation
Infrastructure as Code Demonstration for Azure
- Host: GitHub
- URL: https://github.com/evry-ace/azure-iac-demo
- Owner: evry-ace
- License: mit
- Created: 2021-09-03T20:27:01.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-15T14:44:01.000Z (about 1 year ago)
- Last Synced: 2024-06-21T17:04:10.469Z (7 months ago)
- Language: Go
- Size: 41 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Azure Infrastructure as Code Demo
Infrastructure as Code Demonstration for Azure.
## Tools Overview
* Terraform
* Azure Container Instance
* Azure Storage Accounts
* Azure CosmosDB## Prerequsite
* Azure Subscription
## Setup
| Variables | Description |
|-----------|-------------|
| `ARM_CLIENT_ID` | Azure Service Principal ID |
| `ARM_CLIENT_SECRET` | Azure Service Principal Secret |
| `ARM_SUBSCRIPTION_ID` | Azure Subscription ID |
| `ARM_TENANT_ID` | Azure Tenant ID |
| `TF_VAR_resource_group` | Azure Resource Group Name |Install and set up the [Azure CLI][Azure CLI].
[Azure CLI]: https://docs.microsoft.com/en-us/cli/azure/install-azure-cli
```
az login
az account set --subscription="$ARM_SUBSCRIPTION_ID"
```Create a new resource group
```
az group create --name azure-iac-demo --location westeurope
```Create a new Service Principal
```
az ad sp create-for-rbac \
--name http://$TF_VAR_resource_group \
--role contributor \
--scopes /subscriptions/$ARM_SUBSCRIPTION_ID/resourceGroups/$TF_VAR_resource_group
```## Reference
* https://docs.microsoft.com/en-us/azure/developer/terraform/authenticate-to-azure
* https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/guides/service_principal_client_secret
* https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/container_group
* https://docs.microsoft.com/en-us/azure/container-instances/container-instances-quickstart-portal