File tree Expand file tree Collapse file tree 3 files changed +72
-0
lines changed
quickstart/101-create-resource-group Expand file tree Collapse file tree 3 files changed +72
-0
lines changed Original file line number Diff line number Diff line change 1+ terraform {
2+ required_providers {
3+ azurerm = {
4+ source = " hashicorp/azurerm"
5+ version = " ~>2.0"
6+ }
7+ }
8+ }
9+
10+ provider "azurerm" {
11+ features {}
12+ }
13+
14+ resource "azurerm_resource_group" "rg" {
15+ name = " ${ var . name } -${ var . environment } -rg"
16+ location = " ${ var . location } "
17+ }
Original file line number Diff line number Diff line change 1+ # Create Azure resource group
2+
3+ This template deploys an Azure resource group.
4+
5+ ## Resources
6+
7+ | Terraform Resource Type | Description |
8+ | - | - |
9+ | ` azurerm_resource_group ` | The resource group all resources are deployed into |
10+
11+ ## Variables
12+
13+ | Name | Description |
14+ | -| -|
15+ | ` name ` | Name of the deployment |
16+ | ` environment ` | The depolyment environment name (used for postfixing resource names) |
17+ | ` location ` | The Azure Region to deploy these resources in |
18+
19+ ## Example
20+
21+ ``` bash
22+ terraform plan -out main.tfplan
23+
24+ Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
25+ + create
26+
27+ Terraform will perform the following actions:
28+
29+ # azurerm_resource_group.rg will be created
30+ + resource " azurerm_resource_group" " rg" {
31+ + id = (known after apply)
32+ + location = " eastus"
33+ + name = " sample-dev-rg"
34+ }
35+
36+ Plan: 1 to add, 0 to change, 0 to destroy.
37+
38+ ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
39+
40+ Saved the plan to: main.tfplan
41+
42+ To perform exactly these actions, run the following command to apply:
43+ terraform apply " main.tfplan"
44+ ```
Original file line number Diff line number Diff line change 1+ variable "environment" {
2+ default = " dev"
3+ }
4+
5+ variable "name" {
6+ default = " sample"
7+ }
8+
9+ variable "location" {
10+ default = " eastus"
11+ }
You can’t perform that action at this time.
0 commit comments