Skip to content

Commit db43ecd

Browse files
committed
lonegunmanb feedback
1 parent 8a9f0ff commit db43ecd

File tree

4 files changed

+9
-15
lines changed

4 files changed

+9
-15
lines changed

quickstart/201-iot-hub-with-device-provisioning-service/main.tf

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ resource "azurerm_resource_group" "rg" {
99

1010
# Create storage account & container
1111
resource "random_string" "sa_name" {
12-
length = 12
12+
length = 12
1313
special = false
14-
upper = false
14+
upper = false
1515
}
1616

1717
resource "azurerm_storage_account" "sa" {
@@ -30,12 +30,12 @@ resource "azurerm_storage_container" "my_terraform_container" {
3030

3131

3232
# Create an Event Hub & Authorization Rule
33-
resource "random_pet" "eventhubnamespace_name" {
33+
resource "random_pet" "eventhub_namespace_name" {
3434
prefix = var.eventhub_namespace_name_prefix
3535
}
3636

3737
resource "azurerm_eventhub_namespace" "namespace" {
38-
name = random_pet.eventhubnamespace_name.id
38+
name = random_pet.eventhub_namespace_name.id
3939
resource_group_name = azurerm_resource_group.rg.name
4040
location = azurerm_resource_group.rg.location
4141
sku = "Basic"
@@ -82,7 +82,7 @@ resource "azurerm_iothub" "iothub" {
8282
max_chunk_size_in_bytes = 10485760
8383
container_name = azurerm_storage_container.my_terraform_container.name
8484
encoding = "Avro"
85-
file_name_format = "{iothub}/{partition}_{YYYY}_{MM}_{DD}_{HH}_{mm}"
85+
file_name_format = "{iothub}/{partition}_{YYYY}_{MM}_{DD}_{HH}_{mm}"
8686
}
8787

8888
endpoint {
@@ -129,7 +129,7 @@ resource "azurerm_iothub" "iothub" {
129129
}
130130

131131
#Create IoT Hub Access Policy
132-
resource "azurerm_iothub_shared_access_policy" "hubaccesspolicy" {
132+
resource "azurerm_iothub_shared_access_policy" "hub_access_policy" {
133133
name = "terraform-policy"
134134
resource_group_name = azurerm_resource_group.rg.name
135135
iothub_name = azurerm_iothub.iothub.name
@@ -157,7 +157,7 @@ resource "azurerm_iothub_dps" "dps" {
157157
}
158158

159159
linked_hub {
160-
connection_string = azurerm_iothub_shared_access_policy.hubaccesspolicy.primary_connection_string
160+
connection_string = azurerm_iothub_shared_access_policy.hub_access_policy.primary_connection_string
161161
location = azurerm_resource_group.rg.location
162162
allocation_weight = 150
163163
apply_allocation_policy = true

quickstart/201-iot-hub-with-device-provisioning-service/providers.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
terraform {
2-
required_version = ">=0.12"
2+
required_version = ">=1.0"
33

44
required_providers {
55
azurerm = {
66
source = "hashicorp/azurerm"
7-
version = "~>2.0"
7+
version = ">=3.0"
88
}
99
random = {
1010
source = "hashicorp/random"

quickstart/201-iot-hub-with-device-provisioning-service/readme.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ This template deploys an instance of [Device Provisioning Service](https://learn
2222
| ---- | ----------- | ------- |
2323
| `resource_group_location` | Location of the resource group. | `eastus` |
2424
| `resource_group_name_prefix` | Prefix of the resource group name that's combined with a random ID so the name is unique in your Azure subscription. | `rg` |
25-
| `storage_account_name_prefix` | Prefix of the storage account name that's combined with a random ID so name is unique in your Azure subscription. | `sa` |
2625
| `eventhub_namespace_name_prefix` | Prefix of the event hub namespace name that's combined with a random ID so the name is unique in your Azure subscription. | `namespace` |
2726
| `iothub_name_prefix` | Prefix of the IoT hub name that's combined with a random ID so the name is unique in your Azure subscription. | `iothub` |
2827
| `dps_name_prefix` | Prefix of the dps name that's combined with a random ID so the name is unique in your Azure subscription. | `dps` |

quickstart/201-iot-hub-with-device-provisioning-service/variables.tf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ variable "resource_group_name_prefix" {
88
description = "Prefix of the resource group name that's combined with a random ID so name is unique in your Azure subscription."
99
}
1010

11-
variable "storage_account_name_prefix" {
12-
default = "sa"
13-
description = "Prefix of the storage account name that's combined with a random ID so name is unique in your Azure subscription."
14-
}
15-
1611
variable "eventhub_namespace_name_prefix" {
1712
default = "namespace"
1813
description = "Prefix of the event hub namespace name that's combined with a random ID so name is unique in your Azure subscription."

0 commit comments

Comments
 (0)