azurerm_iot_security_device_group

Manages a Iot Security Device Group.

Example Usage

resource "azurerm_resource_group" "example" {
  name     = "example-resources"
  location = "West Europe"
}

resource "azurerm_iothub" "example" {
  name                = "example-IoTHub"
  resource_group_name = azurerm_resource_group.example.name
  location            = azurerm_resource_group.example.location
  sku {
    name     = "S1"
    capacity = "1"
  }
}

resource "azurerm_iot_security_solution" "example" {
  name                = "example-Iot-Security-Solution"
  resource_group_name = azurerm_resource_group.example.name
  location            = azurerm_resource_group.example.location
  display_name        = "Iot Security Solution"
  iothub_ids          = [azurerm_iothub.example.id]
}

resource "azurerm_iot_security_device_group" "example" {
  name      = "example-device-security-group"
  iothub_id = azurerm_iothub.example.id

  allow_rule {
    connection_to_ips_not_allowed = ["10.0.0.0/24"]
  }

  range_rule {
    type     = "ActiveConnectionsNotInAllowedRange"
    min      = 0
    max      = 30
    duration = "PT5M"
  }

  depends_on = [azurerm_iot_security_solution.example]
}

Argument Reference

The following arguments are supported:


An allow_rule block supports the following:


An range_rule block supports the following:

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

Import

Iot Security Device Group can be imported using the resource id, e.g.

terraform import azurerm_iot_security_device_group.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.Devices/iotHubs/hub1/providers/Microsoft.Security/deviceSecurityGroups/group1