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