azurermIotcentralApplicationNetworkRuleSet
Manages an IoT Central Application Network Rule Set.
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-resource",
}
);
const azurermIotcentralApplicationExample =
new azurerm.iotcentralApplication.IotcentralApplication(this, "example_1", {
display_name: "example-iotcentral-app-display-name",
location: azurermResourceGroupExample.location,
name: "example-iotcentral-app",
resource_group_name: azurermResourceGroupExample.name,
sku: "ST1",
sub_domain: "example-iotcentral-app-subdomain",
tags: {
Foo: "Bar",
},
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermIotcentralApplicationExample.overrideLogicalId("example");
const azurermIotcentralApplicationNetworkRuleSetExample =
new azurerm.iotcentralApplicationNetworkRuleSet.IotcentralApplicationNetworkRuleSet(
this,
"example_2",
{
iotcentral_application_id: azurermIotcentralApplicationExample.id,
ip_rule: [
{
ip_mask: "10.0.1.0/24",
name: "rule1",
},
{
ip_mask: "10.1.1.0/24",
name: "rule2",
},
],
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermIotcentralApplicationNetworkRuleSetExample.overrideLogicalId("example");
Arguments Reference
The following arguments are supported:
-
iotcentralApplicationId
- (Required) The ID of the IoT Central Application. Changing this forces a new resource to be created. -
applyToDevice
- (Optional) Whether these IP Rules apply for device connectivity to IoT Hub and Device Provisioning Service associated with this IoT Central Application. Possible values aretrue
,false
. Defaults totrue
-
defaultAction
- (Optional) Specifies the default action for the IoT Central Application Network Rule Set. Possible values areallow
anddeny
. Defaults todeny
. -
ipRule
- (Optional) One or moreipRule
blocks as defined below.
A ipRule
block supports the following:
-
name
- (Required) The name of the IP Rule -
ipMask
- (Required) The IP address range in CIDR notation for the IP Rule.
Attributes Reference
In addition to the Arguments listed above - the following Attributes are exported:
id
- The ID of the IoT Central Application Network Rule Set.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the IoT Central Application Network Rule Set.read
- (Defaults to 5 minutes) Used when retrieving the IoT Central Application Network Rule Set.update
- (Defaults to 30 minutes) Used when updating the IoT Central Application Network Rule Set.delete
- (Defaults to 30 minutes) Used when deleting the IoT Central Application Network Rule Set.
Import
IoT Central Application Network Rule Sets can be imported using the resourceId
, e.g.