Skip to content

azurermBotServiceAzureBot

Manages an Azure Bot 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 dataAzurermClientConfigCurrent =
  new azurerm.dataAzurermClientConfig.DataAzurermClientConfig(
    this,
    "current",
    {}
  );
const azurermApplicationInsightsExample =
  new azurerm.applicationInsights.ApplicationInsights(this, "example_2", {
    application_type: "web",
    location: azurermResourceGroupExample.location,
    name: "example-appinsights",
    resource_group_name: azurermResourceGroupExample.name,
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermApplicationInsightsExample.overrideLogicalId("example");
const azurermApplicationInsightsApiKeyExample =
  new azurerm.applicationInsightsApiKey.ApplicationInsightsApiKey(
    this,
    "example_3",
    {
      application_insights_id: azurermApplicationInsightsExample.id,
      name: "example-appinsightsapikey",
      read_permissions: [
        "aggregate",
        "api",
        "draft",
        "extendqueries",
        "search",
      ],
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermApplicationInsightsApiKeyExample.overrideLogicalId("example");
const azurermBotServiceAzureBotExample =
  new azurerm.botServiceAzureBot.BotServiceAzureBot(this, "example_4", {
    developer_app_insights_api_key:
      azurermApplicationInsightsApiKeyExample.apiKey,
    developer_app_insights_application_id:
      azurermApplicationInsightsExample.appId,
    endpoint: "https://example.com",
    location: "global",
    microsoft_app_id: dataAzurermClientConfigCurrent.clientId,
    name: "exampleazurebot",
    resource_group_name: azurermResourceGroupExample.name,
    sku: "F0",
    tags: {
      environment: "test",
    },
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermBotServiceAzureBotExample.overrideLogicalId("example");

Arguments Reference

The following arguments are supported:

  • name - (Required) The name which should be used for this Azure Bot Service. Changing this forces a new resource to be created.

  • resourceGroupName - (Required) The name of the Resource Group where the Azure Bot Service should exist. Changing this forces a new resource to be created.

  • location - (Required) The supported Azure location where the Azure Bot Service should exist. Changing this forces a new resource to be created.

  • microsoftAppId - (Required) The Microsoft Application ID for the Azure Bot Service. Changing this forces a new resource to be created.

  • sku - (Required) The SKU of the Azure Bot Service. Accepted values are f0 or s1. Changing this forces a new resource to be created.

  • developerAppInsightsApiKey - (Optional) The Application Insights API Key to associate with this Azure Bot Service.

  • developerAppInsightsApplicationId - (Optional) The resource ID of the Application Insights instance to associate with this Azure Bot Service.

  • developerAppInsightsKey - (Optional) The Application Insight Key to associate with this Azure Bot Service.

  • displayName - (Optional) The name that the Azure Bot Service will be displayed as. This defaults to the value set for name if not specified.

  • endpoint - (Optional) The Azure Bot Service endpoint.

  • microsoftAppMsiId - (Optional) The ID of the Microsoft App Managed Identity for this Azure Bot Service. Changing this forces a new resource to be created.

  • microsoftAppTenantId - (Optional) The Tenant ID of the Microsoft App for this Azure Bot Service. Changing this forces a new resource to be created.

  • microsoftAppType - (Optional) The Microsoft App Type for this Azure Bot Service. Possible values are multiTenant, singleTenant and userAssignedMsi. Changing this forces a new resource to be created.

  • luisAppIds - (Optional) A list of LUIS App IDs to associate with this Azure Bot Service.

  • luisKey - (Optional) The LUIS key to associate with this Azure Bot Service.

  • streamingEndpointEnabled - (Optional) Is the streaming endpoint enabled for this Azure Bot Service. Defaults to false.

  • tags - (Optional) A mapping of tags which should be assigned to this Azure Bot Service.

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

  • id - The ID of the Azure Bot Service.

Timeouts

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

  • create - (Defaults to 30 minutes) Used when creating the Azure Bot Service.
  • read - (Defaults to 5 minutes) Used when retrieving the Azure Bot Service.
  • update - (Defaults to 30 minutes) Used when updating the Azure Bot Service.
  • delete - (Defaults to 30 minutes) Used when deleting the Azure Bot Service.

Import

Azure Bot Services can be imported using the resourceId, e.g.

terraform import azurerm_bot_service_azure_bot.example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.BotService/botServices/botService1