azurermBotChannelDirectline
Manages a Directline integration for a Bot Channel
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 dataAzurermClientConfigCurrent =
new azurerm.dataAzurermClientConfig.DataAzurermClientConfig(
this,
"current",
{}
);
const azurermBotChannelsRegistrationExample =
new azurerm.botChannelsRegistration.BotChannelsRegistration(
this,
"example_2",
{
location: "global",
microsoft_app_id: dataAzurermClientConfigCurrent.clientId,
name: "example",
resource_group_name: azurermResourceGroupExample.name,
sku: "F0",
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermBotChannelsRegistrationExample.overrideLogicalId("example");
const azurermBotChannelDirectlineExample =
new azurerm.botChannelDirectline.BotChannelDirectline(this, "example_3", {
bot_name: azurermBotChannelsRegistrationExample.name,
location: azurermBotChannelsRegistrationExample.location,
resource_group_name: azurermResourceGroupExample.name,
site: [
{
enabled: true,
name: "default",
},
],
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermBotChannelDirectlineExample.overrideLogicalId("example");
Argument Reference
The following arguments are supported:
-
resourceGroupName
- (Required) The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created. -
location
- (Required) The supported Azure location where the resource exists. Changing this forces a new resource to be created. -
botName
- (Required) The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created. -
site
- (Required) A site represents a client application that you want to connect to your bot. Multiplesite
blocks may be defined as below
A site
block has the following properties:
-
name
- (Required) The name of the site -
enabled
- (Optional) Enables/Disables this site. Enabled by default Defaults totrue
. -
v1Allowed
- (Optional) Enables v1 of the Directline protocol for this site. Enabled by default Defaults totrue
. -
v3Allowed
- (Optional) Enables v3 of the Directline protocol for this site. Enabled by default Defaults totrue
. -
enhancedAuthenticationEnabled
- (Optional) Enables additional security measures for this site, see Enhanced Directline Authentication Features. Disabled by default. -
trustedOrigins
- (Optional) This field is required whenisSecureSiteEnabled
is enabled. Determines which origins can establish a Directline conversation for this site.
Attributes Reference
The following attributes are exported:
id
- The Bot Channel ID.
A site
block exports the following:
-
key
- Primary key for accessing this site -
key2
- Secondary key for accessing this site -
id
- Id for the site
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the Directline Channel.update
- (Defaults to 30 minutes) Used when updating the Directline Channel.read
- (Defaults to 5 minutes) Used when retrieving the Directline Channel.delete
- (Defaults to 30 minutes) Used when deleting the Directline Channel.
Import
The Directline Channel for a Bot can be imported using the resourceId
, e.g.