Skip to content

Commit 50143f6

Browse files
Scott WinklerScott Winkler
authored andcommitted
minor change to name
1 parent 07f5b14 commit 50143f6

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

chapter5/complete/main.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
resource "azurerm_resource_group" "default" {
2-
name = var.namespace
3-
location = var.region
4-
}
5-
61
resource "random_string" "rand" {
72
length = 24
83
special = false
@@ -13,6 +8,11 @@ locals {
138
namespace = substr(join("-", [var.namespace, random_string.rand.result]), 0, 24)
149
}
1510

11+
resource "azurerm_resource_group" "default" {
12+
name = local.namespace
13+
location = var.region
14+
}
15+
1616
resource "azurerm_storage_account" "storage_account" {
1717
name = random_string.rand.result
1818
resource_group_name = azurerm_resource_group.default.name

chapter5/listing5.4/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
resource "azurerm_resource_group" "default" {
2-
name = var.namespace
2+
name = local.namespace
33
location = var.region
44
}

chapter5/listing5.5/main.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
resource "azurerm_resource_group" "default" {
2-
name = var.namespace
3-
location = var.region
4-
}
5-
61
resource "random_string" "rand" {
72
length = 24
83
special = false
@@ -12,3 +7,8 @@ resource "random_string" "rand" {
127
locals {
138
namespace = substr(join("-", [var.namespace, random_string.rand.result]), 0, 24)
149
}
10+
11+
resource "azurerm_resource_group" "default" {
12+
name = local.namespace
13+
location = var.region
14+
}

0 commit comments

Comments
 (0)