Hello, I'm trying to import an existing Azure IoT ...
# dotnet
r
Hello, I'm trying to import an existing Azure IoT hub into my environment. I'm getting the error "ID was missing the IoTHubs element". I'm using the import command provided in the documentation
pulumi import azure:iot/ioTHub:IoTHub hub1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Devices/iotHubs/hub1
and replacing the subscription id, resource group name, and iot hub logical name and identifier. Am I missing something? Is the iotHubs a placeholder for another id?
Would this be a more appropriate question for the azure channel?
m
Hi Stephen, I believe the type should be
azure:iot:IoTHub
as shown, for instance, here on the YAML tab. When you say you replaced subscription id, resource group name, and iot hub logical name and identifier, it sounds like you might have replaced too much? In the
id
argument, you only need to replace subscription and resource group. Let me know if that helps.
r
I meant I replaced hub1 with the name of my existing IoT Hub. I'm still getting the same error.
m
Ok. Could you file an issue, please? https://github.com/pulumi/pulumi-azure/issues