azurerm_iothub_device_update_instance

Manages an IoT Hub Device Update Instance.

Example Usage

resource "azurerm_resource_group" "example" {
  name     = "example-resources"
  location = "East US"
}

resource "azurerm_iothub_device_update_account" "example" {
  name                = "example"
  resource_group_name = azurerm_resource_group.example.name
  location            = azurerm_resource_group.example.location
}

resource "azurerm_iothub" "example" {
  name                = "example"
  resource_group_name = azurerm_resource_group.example.name
  location            = azurerm_resource_group.example.location

  sku {
    name     = "S1"
    capacity = "1"
  }
}

resource "azurerm_storage_account" "example" {
  name                     = "example"
  resource_group_name      = azurerm_resource_group.example.name
  location                 = azurerm_resource_group.example.location
  account_tier             = "Standard"
  account_replication_type = "LRS"
}

resource "azurerm_iothub_device_update_instance" "example" {
  name                     = "example"
  device_update_account_id = azurerm_iothub_device_update_account.example.id
  iothub_id                = azurerm_iothub.example.id
  diagnostic_enabled       = true

  diagnostic_storage_account {
    connection_string = azurerm_storage_account.example.primary_connection_string
    id                = azurerm_storage_account.example.id
  }

  tags = {
    key = "value"
  }
}

Arguments Reference

The following arguments are supported:


A diagnostic_storage_account 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 Hub Device Update Instance can be imported using the resource id, e.g.

terraform import azurerm_iothub_device_update_instance.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.DeviceUpdate/accounts/account1/instances/instance1