Skip to content

saif-resources / bot

Creates an Azure Bot Service with app registration identity and optional OAuth connections for SSO.

Usage

module "bot" {
  source  = "app.terraform.io/SAIFCorp/resources/saif//modules/bot"
  version = "~> 1.0.0"

  context  = module.environment.context
  identity = module.identity.identity

  name                = var.project_id
  display_name        = "My Bot"
  resource_group_name = module.resource_group.resource_group_name
  endpoint            = module.api.bot_endpoint

  oauth_connections = {
    sso = {
      client_id     = module.identity.identity.app_client_id
      client_secret = "<client_secret_value>"
      scopes        = "User.Read openid profile"
      parameters    = { tenantId = module.environment.context.tenant_id }
    }
  }
}

Outputs

Name Description
name Azure Bot Service name
endpoint Bot Framework messaging endpoint URL

Providers

No providers.

Inputs

Name Description Type Default Required
context Platform context from the environment module any n/a yes
display_name Bot display name shown to users. When null or empty, defaults to "${name}-${context.environment_short_name} (${context.environment})". string n/a yes
endpoint The Bot Framework messaging endpoint URL (e.g. module.api.bot_endpoint) string n/a yes
identity Identity bundle from the identity module any n/a yes
microsoft_app_type The Microsoft App authentication type (SingleTenant or MultiTenant) string "SingleTenant" no
name Bot name suffix (combined with environment_short_name) string n/a yes
oauth_connections Map of OAuth connection settings for the bot
map(object({
client_id = string
client_secret = string
scopes = string
parameters = optional(map(string), {})
}))
{} no
resource_group_name The resource group for the bot service string n/a yes
sku The SKU for the Bot Service (F0 or S1) string "F0" no

Outputs

Name Description
endpoint The Bot Framework messaging endpoint URL
name The Azure Bot Service name

Resources


View source on GitHub