azurermBotChannelFacebook
Manages a Facebook integration for a Bot Channel
\~> Note A bot can only have a single Facebook Channel associated with it.
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-bcr",
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 azurermBotChannelFacebookExample =
new azurerm.botChannelFacebook.BotChannelFacebook(this, "example_3", {
bot_name: azurermBotChannelsRegistrationExample.name,
facebook_application_id: "563490254873576",
facebook_application_secret: "8976d2536445ad5b976dee8437b9beb0",
location: azurermBotChannelsRegistrationExample.location,
page: [
{
access_token:
"CGGCec3UAFPMBAKwK3Ft8SEpO8ZCuvpNBI5DClaJCDfqJj2BgEHCKxcY0FDarmUQap6XxpZC9GWCW4nZCzjcKosAZAP7SO44X8Q8gAntbDIXgYUBGp9xtS8wUkwgKPobUePcOOVFkvClxvYZByuiQxoTiK9fQ9jZCPEorbmZCsKDZAx4VLnrNwCTZAPUwXxO61gfq4ZD",
id: "876248795081953",
},
],
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.*/
azurermBotChannelFacebookExample.overrideLogicalId("example");
Argument Reference
The following arguments are supported:
-
resourceGroupName
- (Required) The name of the resource group where the Facebook Channel should be created. Changing this forces a new resource to be created. -
location
- (Required) Specifies 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. -
facebookApplicationId
- (Required) The Facebook Application ID for the Facebook Channel. -
facebookApplicationSecret
- (Required) The Facebook Application Secret for the Facebook Channel. -
page
- (Required) One or morepage
blocks as defined below.
The page
block supports the following:
-
id
- (Required) The Facebook Page ID for the Facebook Channel. -
accessToken
- (Required) The Facebook Page Access Token for the Facebook Channel.
Attributes Reference
The following attributes are exported:
id
- The ID of the Facebook Integration for a Bot Channel.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the Facebook Integration for a Bot Channel.update
- (Defaults to 30 minutes) Used when updating the Facebook Integration for a Bot Channel.read
- (Defaults to 5 minutes) Used when retrieving the Facebook Integration for a Bot Channel.delete
- (Defaults to 30 minutes) Used when deleting the Facebook Integration for a Bot Channel.
Import
The Facebook Integration for a Bot Channel can be imported using the resourceId
, e.g.