Skip to content

Commit a36eb9f

Browse files
committed
iot hub in place
1 parent 87c9b67 commit a36eb9f

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

7_iot/iot-hub/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ resource "azurerm_iothub" "hub" {
4848
public_network_access_enabled = var.public_network_access_enabled
4949
local_authentication_enabled = var.local_authentication_enabled
5050
event_hub_partition_count = var.event_hub_partition_count
51+
event_hub_retention_in_days = var.event_hub_retention_in_days
5152
min_tls_version = var.min_tls_version
5253

5354
tags = var.tags

7_iot/iot-hub/variables.tf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,17 @@ variable "event_hub_partition_count" {
7373
}
7474
}
7575

76+
variable "event_hub_retention_in_days" {
77+
description = "Retention time in days for the built-in Event Hub-compatible endpoint. Must be between 1 and 7."
78+
type = number
79+
default = 1
80+
81+
validation {
82+
condition = var.event_hub_retention_in_days >= 1 && var.event_hub_retention_in_days <= 7
83+
error_message = "event_hub_retention_in_days must be between 1 and 7."
84+
}
85+
}
86+
7687
variable "min_tls_version" {
7788
description = "Minimum TLS version enforced by the IoT Hub."
7889
type = string

0 commit comments

Comments
 (0)