Skip to main content

almaforge_telegram_connector Data Source

Read an AlmaForge TelegramConnector resource by name.

This data source reads existing cluster resources. It does not create, change, or delete them. Authenticate using the Terraform setup guide. Your identity needs permission to read the selected resources.

The built-in Telegram integration reads the connector named telegram. See Telegram integration for chat routing and notification behavior. Secret fields are redacted by the API and returned as null.

See the configuration reference for the resource manifest and field context.

Set name to the existing object's metadata.name. The result is available in metadata and spec. A missing object produces an error.

Example Usage​

Save this configuration in a new directory. Replace the example name with the existing object you want to read. Review the plan before applying it. Applying this data-only configuration saves the outputs without changing cluster resources.

Terminal
terraform initterraform plan -out=plan.tfplanterraform apply plan.tfplanterraform output
HCL
terraform {
required_providers {
almaforge = {
source = "get.almaforge.com/almaforge/almaforge"
}
}
}

provider "almaforge" {}

data "almaforge_telegram_connector" "existing" {
name = "telegram"
}

output "name" {
value = data.almaforge_telegram_connector.existing.metadata.name
}

To manage changes instead of only reading, use the resource. Read resources versus data sources before choosing ownership.

Schema​

Required​

  • name (String) Name of the resource to read.

Read-Only​

Nested Schema for metadata​

Read-Only:

  • labels (Map of String) Labels attached to the resource.
  • name (String) Resource name. Changing this name replaces the resource.
  • resource_version (String) Server revision used to detect concurrent changes.

Nested Schema for spec​

Read-Only:

  • api_url (String) APIURL overrides the Telegram Bot API base URL. Defaults to https://api.telegram.org when empty.
  • bot_token (String, Sensitive) BotToken is the Telegram bot token from BotFather. Accepts a literal value or a value-expansion reference such as "${file:/etc/telegram/token}" or "${env:TELEGRAM_BOT_TOKEN}".
  • role_to_recipients (Map of Object) RoleToRecipients maps requested roles to Telegram chat identifiers. Values are numeric chat_id strings (for private chats, groups, or channels) or @channelusername for public channels. The "*" key is the required default recipient list. (see below for nested schema)

Nested Schema for spec.role_to_recipients​

Read-Only:

  • values (List of String)