azurermIothubDps
Manages an IotHub Device Provisioning Service.
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: "West Europe",
name: "example-resources",
}
);
const azurermIothubDpsExample = new azurerm.iothubDps.IothubDps(
this,
"example_1",
{
allocation_policy: "Hashed",
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.*/
azurermIothubDpsExample.overrideLogicalId("example");
Argument Reference
The following arguments are supported:
-
name
- (Required) Specifies the name of the Iot Device Provisioning Service resource. Changing this forces a new resource to be created. -
resourceGroupName
- (Required) The name of the resource group under which the Iot Device Provisioning Service resource has to be created. Changing this forces a new resource to be created. -
location
- (Required) Specifies the supported Azure location where the resource has to be created. Changing this forces a new resource to be created. -
allocationPolicy
- (Optional) The allocation policy of the IoT Device Provisioning Service (hashed
,geoLatency
orstatic
). Defaults tohashed
. -
dataResidencyEnabled
- (Optional) Specifies if the IoT Device Provisioning Service has data residency and disaster recovery enabled. Defaults tofalse
. Changing this forces a new resource to be created. -
sku
- (Required) Asku
block as defined below. -
linkedHub
- (Optional) AlinkedHub
block as defined below. -
publicNetworkAccessEnabled
- (Optional) Whether requests from Public Network are allowed. Defaults totrue
. -
ipFilterRule
- (Optional) AnipFilterRule
block as defined below. -
tags
- (Optional) A mapping of tags to assign to the resource.
A sku
block supports the following:
-
name
- (Required) The name of the sku. Currently can only be set tos1
. -
capacity
- (Required) The number of provisioned IoT Device Provisioning Service units.
A linkedHub
block supports the following:
-
connectionString
- (Required) The connection string to connect to the IoT Hub. -
location
- (Required) The location of the IoT hub. -
applyAllocationPolicy
- (Optional) Determines whether to apply allocation policies to the IoT Hub. Defaults totrue
. -
allocationWeight
- (Optional) The weight applied to the IoT Hub. Defaults to1
. -
hostname
- (Computed) The IoT Hub hostname.
An ipFilterRule
block supports the following:
-
name
- (Required) The name of the filter. -
ipMask
- (Required) The IP address range in CIDR notation for the rule. -
action
- (Required) The desired action for requests captured by this rule. Possible values areaccept
,reject
-
target
- (Optional) Target for requests captured by this rule. Possible values areall
,deviceApi
andserviceApi
.
Attributes Reference
The following attributes are exported:
-
id
- The ID of the IoT Device Provisioning Service. -
deviceProvisioningHostName
- The device endpoint of the IoT Device Provisioning Service. -
idScope
- The unique identifier of the IoT Device Provisioning Service. -
serviceOperationsHostName
- The service endpoint of the IoT Device Provisioning Service.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the IotHub Device Provisioning Service.update
- (Defaults to 30 minutes) Used when updating the IotHub Device Provisioning Service.read
- (Defaults to 5 minutes) Used when retrieving the IotHub Device Provisioning Service.delete
- (Defaults to 30 minutes) Used when deleting the IotHub Device Provisioning Service.
Import
IoT Device Provisioning Service can be imported using the resourceId
, e.g.