Skip to main content

almaforge_slack_connector Data Source

Read an AlmaForge SlackConnector 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 Slack integration reads the connector named slack. See Slack integration for recipient routing and verification. 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_slack_connector" "existing" {
name = "slack"
}

output "name" {
value = data.almaforge_slack_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:

  • bot_token (String, Sensitive) BotToken is the Slack Bot User OAuth Token. Accepts a literal value or a value-expansion reference such as "${file:/etc/slack/token}" or "${env:SLACK_BOT_TOKEN}".
  • role_to_recipients (Map of Object) RoleToRecipients maps requested roles to Slack recipient lists. The "*" key is the required default recipient list. (see below for nested schema)
  • username_claim (String) UsernameClaim selects which Slack user field maps to AlmaForge username. Accepts "email" (default) or "username".

Nested Schema for spec.role_to_recipients​

Read-Only:

  • values (List of String)