format terraform
This commit is contained in:
parent
8c845be0a2
commit
25aa1d089a
@ -10,9 +10,9 @@ resource "azurerm_resource_group" "rg" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
resource "azurerm_iothub" "iothub" {
|
resource "azurerm_iothub" "iothub" {
|
||||||
name = "iothub-${random_string.suffix.result}"
|
name = "iothub-${random_string.suffix.result}"
|
||||||
resource_group_name = azurerm_resource_group.rg.name
|
resource_group_name = azurerm_resource_group.rg.name
|
||||||
location = azurerm_resource_group.rg.location
|
location = azurerm_resource_group.rg.location
|
||||||
public_network_access_enabled = false
|
public_network_access_enabled = false
|
||||||
|
|
||||||
sku {
|
sku {
|
||||||
@ -45,10 +45,10 @@ resource "azurerm_iothub_shared_access_policy" "iothub_policy" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
resource "azurerm_iothub_dps" "dps" {
|
resource "azurerm_iothub_dps" "dps" {
|
||||||
name = "test-device-${random_string.suffix.result}"
|
name = "test-device-${random_string.suffix.result}"
|
||||||
resource_group_name = azurerm_resource_group.rg.name
|
resource_group_name = azurerm_resource_group.rg.name
|
||||||
location = azurerm_resource_group.rg.location
|
location = azurerm_resource_group.rg.location
|
||||||
allocation_policy = "Hashed"
|
allocation_policy = "Hashed"
|
||||||
public_network_access_enabled = false
|
public_network_access_enabled = false
|
||||||
|
|
||||||
sku {
|
sku {
|
||||||
@ -57,8 +57,8 @@ resource "azurerm_iothub_dps" "dps" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
linked_hub {
|
linked_hub {
|
||||||
connection_string = azurerm_iothub_shared_access_policy.iothub_policy.primary_connection_string
|
connection_string = azurerm_iothub_shared_access_policy.iothub_policy.primary_connection_string
|
||||||
location = azurerm_resource_group.rg.location
|
location = azurerm_resource_group.rg.location
|
||||||
allocation_weight = 150
|
allocation_weight = 150
|
||||||
apply_allocation_policy = true
|
apply_allocation_policy = true
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
variable "location" {
|
variable "location" {
|
||||||
type = string
|
type = string
|
||||||
default = "westeurope"
|
default = "westeurope"
|
||||||
description = "Location of the resource group"
|
description = "Location of the resource group"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "vnet_address_space" {
|
variable "vnet_address_space" {
|
||||||
type = string
|
type = string
|
||||||
default = "10.0.0.0/16"
|
default = "10.0.0.0/16"
|
||||||
description = "Address range of the virtual network"
|
description = "Address range of the virtual network"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "iothub_subnet_address_space" {
|
variable "iothub_subnet_address_space" {
|
||||||
type = string
|
type = string
|
||||||
default = "10.0.3.0/24"
|
default = "10.0.3.0/24"
|
||||||
description = "Address range of the subnet containing the iothub"
|
description = "Address range of the subnet containing the iothub"
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user