Manages a Directline integration for a Bot Channel
data "azurerm_client_config" "current" {}
resource "azurerm_resource_group" "example" {
name = "example-resources"
location = "West Europe"
}
resource "azurerm_bot_channels_registration" "example" {
name = "example"
location = "global"
resource_group_name = azurerm_resource_group.example.name
sku = "F0"
microsoft_app_id = data.azurerm_client_config.current.client_id
}
resource "azurerm_bot_channel_directline" "example" {
bot_name = azurerm_bot_channels_registration.example.name
location = azurerm_bot_channels_registration.example.location
resource_group_name = azurerm_resource_group.example.name
site {
name = "default"
enabled = true
}
}
The following arguments are supported:
resource_group_name
- (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.
bot_name
- (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. One or more site
blocks as defined below.
A site
block has the following properties:
name
- (Required) The name of the site
user_upload_enabled
- (Optional) Is the user upload enabled for this site? Defaults to true
.
enabled
- (Optional) Enables/Disables this site. Defaults to true
.
endpoint_parameters_enabled
- (Optional) Is the endpoint parameters enabled for this site?
storage_enabled
- (Optional) Is the storage site enabled for detailed logging? Defaults to true
.
v1_allowed
- (Optional) Enables v1 of the Directline protocol for this site. Defaults to true
.
v3_allowed
- (Optional) Enables v3 of the Directline protocol for this site. Defaults to true
.
enhanced_authentication_enabled
- (Optional) Enables additional security measures for this site, see Enhanced Directline Authentication Features. Disabled by default.
trusted_origins
- (Optional) This field is required when is_secure_site_enabled
is enabled. Determines which origins can establish a Directline conversation for this site.
In addition to the Arguments listed above - 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
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.The Directline Channel for a Bot can be imported using the resource id
, e.g.
terraform import azurerm_bot_channel_directline.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.BotService/botServices/example/channels/DirectlineChannel