Search code examples
azureautomationterraformazure-iot-hub

Create a device in Azure IoT Hub by Terraform


I am trying to automate setting up of IoT Hub. But I am not able to find any code related to creating a device in the IoT Hub. I found the below command:

resource “azurerm_iothub_device” “example” {
    name = “device_name” iothub_name = azurerm_iothub.iothub12.name
}

But it does not seem to be valid. I have installed the extensions azure IoT Hub and IoT Device Workbench.

How can I do it?


Solution

  • According to EliiseS, as of now, support for IoT Hub device creation using Terraform is not available.