Skip to content

Commit a8ba805

Browse files
committed
Implemented changes per review
1 parent 2c79eb6 commit a8ba805

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

quickstart/101-resource-group/main.tf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ provider "azurerm" {
1414
features {}
1515
}
1616

17-
resource "random_uuid" "uuid" {}
17+
resource "random_pet" "rg-name" {
18+
prefix = var.resource_group_name_prefix
19+
}
1820

1921
resource "azurerm_resource_group" "rg" {
20-
name = "${var.resource_group_name_prefix}-${random_uuid.uuid.result}"
22+
name = random_pet.rg-name.id
2123
location = var.resource_group_location
2224
}

quickstart/101-resource-group/readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ This template deploys an Azure resource group with a random name beginning with
1111

1212
| Name | Description |
1313
|-|-|
14-
| `resource_group_name_prefix` | Prefix of the resource group name that's combined with a random number so name is unique in your Azure subscription. |
15-
| `resource_group_location` | The Azure Region to deploy these resources in |
14+
| `resource_group_name_prefix` | (Optional) Prefix of the resource group name that's combined with a random number so name is unique in your Azure subscription. |
15+
| `resource_group_location` | (Optional) The Azure Region to deploy these resources in |
1616

1717
## Example
1818

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
variable "resource_group_name_prefix" {
22
default = "rg"
3-
description = "Prefix of the resource group name that's combined with a random number so name is unique in your Azure subscription."
3+
description = "Prefix of the resource group name that's combined with a random ID so name is unique in your Azure subscription."
44
}
55

66
variable "resource_group_location" {
77
default = "eastus"
8+
description = "Location of the resource group."
89
}

0 commit comments

Comments
 (0)