Skip to content

Data Source: azurermIothubSharedAccessPolicy

Use this data source to access information about an existing IotHub Shared Access Policy

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.*/
new azurerm.dataAzurermIothubSharedAccessPolicy.DataAzurermIothubSharedAccessPolicy(
  this,
  "example",
  {
    iothub_name: "${azurerm_iothub.example.name}",
    name: "example",
    resource_group_name: "${azurerm_resource_group.example.name}",
  }
);

Argument Reference

The following arguments are supported:

  • name - Specifies the name of the IotHub Shared Access Policy resource.

  • resourceGroupName - The name of the resource group under which the IotHub Shared Access Policy resource has to be created.

  • iothubName - The name of the IoTHub to which this Shared Access Policy belongs.

Attributes Reference

The following attributes are exported:

  • id - The ID of the IoTHub Shared Access Policy.

  • primaryKey - The primary key used to create the authentication token.

  • primaryConnectionString - The primary connection string of the Shared Access Policy.

  • secondaryKey - The secondary key used to create the authentication token.

  • secondaryConnectionString - The secondary connection string of the Shared Access Policy.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • read - (Defaults to 5 minutes) Used when retrieving the IotHub Shared Access Policy.