azurermIothubDeviceUpdateInstance
Manages an IoT Hub Device Update Instance.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
this,
"example",
{
location: "East US",
name: "example-resources",
}
);
const azurermStorageAccountExample = new azurerm.storageAccount.StorageAccount(
this,
"example_1",
{
account_replication_type: "LRS",
account_tier: "Standard",
location: azurermResourceGroupExample.location,
name: "example",
resource_group_name: azurermResourceGroupExample.name,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermStorageAccountExample.overrideLogicalId("example");
const azurermIothubExample = new azurerm.iothub.Iothub(this, "example_2", {
location: azurermResourceGroupExample.location,
name: "example",
resource_group_name: azurermResourceGroupExample.name,
sku: [
{
capacity: "1",
name: "S1",
},
],
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermIothubExample.overrideLogicalId("example");
const azurermIothubDeviceUpdateAccountExample =
new azurerm.iothubDeviceUpdateAccount.IothubDeviceUpdateAccount(
this,
"example_3",
{
location: azurermResourceGroupExample.location,
name: "example",
resource_group_name: azurermResourceGroupExample.name,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermIothubDeviceUpdateAccountExample.overrideLogicalId("example");
const azurermIothubDeviceUpdateInstanceExample =
new azurerm.iothubDeviceUpdateInstance.IothubDeviceUpdateInstance(
this,
"example_4",
{
device_update_account_id: azurermIothubDeviceUpdateAccountExample.id,
diagnostic_enabled: true,
diagnostic_storage_account: [
{
connection_string:
azurermStorageAccountExample.primaryConnectionString,
id: azurermStorageAccountExample.id,
},
],
iothub_id: azurermIothubExample.id,
name: "example",
tags: {
key: "value",
},
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermIothubDeviceUpdateInstanceExample.overrideLogicalId("example");
Arguments Reference
The following arguments are supported:
-
name
- (Required) Specifies the name which should be used for this IoT Hub Device Update Instance. Changing this forces a new resource to be created. -
deviceUpdateAccountId
- (Required) Specifies the ID of the IoT Hub Device Update Account where the IoT Hub Device Update Instance exists. Changing this forces a new resource to be created. -
iothubId
- (Required) Specifies the ID of the IoT Hub associated with the IoT Hub Device Update Instance. Changing this forces a new resource to be created. -
diagnosticStorageAccount
- (Optional) AdiagnosticStorageAccount
block as defined below. -
diagnosticEnabled
- (Optional) Whether the diagnostic log collection is enabled. Possible values aretrue
andfalse
. Defaults tofalse
. -
tags
- (Optional) A mapping of tags which should be assigned to the IoT Hub Device Update Instance.
A diagnosticStorageAccount
block supports the following:
-
connectionString
- (Required) Connection String of the Diagnostic Storage Account. -
id
- (Required) Resource ID of the Diagnostic Storage Account.
Attributes Reference
In addition to the Arguments listed above - the following Attributes are exported:
id
- The ID of the IoT Hub Device Update Instance.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the IoT Hub Device Update Instance.read
- (Defaults to 5 minutes) Used when retrieving the IoT Hub Device Update Instance.update
- (Defaults to 30 minutes) Used when updating the IoT Hub Device Update Instance.delete
- (Defaults to 30 minutes) Used when deleting the IoT Hub Device Update Instance.
Import
IoT Hub Device Update Instance can be imported using the resourceId
, e.g.