CloudTruth Documentation
Sign InAPIIntegrationsGitHubVisit our website
  • Overview
  • Getting Started
  • Architecture
    • 🔒Security Overview
  • Copilot
  • 🏢Org management
    • Account Setup
    • Access Control
      • 🔑API Tokens
      • 🌐Protecting Projects and Environments
      • 👥Users
    • Audit Log
  • 🛠️Config Management
    • Projects
    • Parameters
      • Sharing Config Data
      • Parameter Management
        • Internal Values
          • Dynamic Values
        • External Values
          • Terraform Remote State Files
        • Parameter Override
        • Environment Value Override
      • Parameter and Parameter Value Inheritance
      • Value Comparison
      • Value History
      • Value Validation
      • Value Expiration
    • Environments and Tags
    • Templates
      • 📒Sample Templates
    • Actions
      • Import Actions
      • Push Actions
    • CLI & API
      • CloudTruth CLI
      • Rest API
    • Integrations
      • Argo CD
      • Atlassian Compass
      • AWS
        • AWS Connection
        • AWS Role
          • CloudFormation
          • Terrraform
          • AWS Console
        • Parameter Store (SSM)
        • S3
        • Secrets Manager
      • Azure Key Vault
      • Bitbucket Pipelines
      • Docker
      • Docker Compose
      • GitHub
      • GitHub Actions
      • GitLab
      • Harness
      • Jenkins
      • Kubernetes
      • Pulumi
      • Terraform
      • Terragrunt
      • Explorer
      • Circle CI
    • Events, Notifications, Webhooks
    • Types
  • 🔎REPORTING
    • Compare
    • History
    • Expirations
  • 🚀PRODUCT
    • What is CloudTruth?
    • Interactive Demo
    • Kubernetes
    • Terraform
    • CI/CD Pipeline Configuration
    • Cloud CMDB
    • Secrets Management
    • GitOps
    • Our Manifesto
    • Open Source
    • FAQs
    • Our Mission
  • 📚Reference
    • 🎓Quick Start Videos
      • What is CloudTruth?
      • CloudTruth in Action
      • Environments and Projects
      • Secrets, Parameters, ENV variables
      • Audit Logs, RBAC, SSO
      • Containers - Kubernetes, Docker
      • Infrastructure as Code (IaC) - Terraform, Cloudformation, CDK, Azure Bicep, Pulumi
      • CICD Pipelines - GitHub Actions, ArgoCD, Jenkins, CircleCI, Harness, GitLab Pipelines
      • AWS Videos - Secret Manager, Parameter Store, S3, IAM
      • Azure Videos - Azure DevOps, Azure Bicep, PowerShell
    • Knowledge Base
      • Best Practices
        • Versioned Releases
      • CLI
        • History comparison of deleted parameters with null values
      • Integrations
        • Advanced AWS IAM policy permissions
        • K8s pull image from private Docker registry
        • S3 Region Selection
      • Templates
        • Templates render quotations in key values as quot
    • Roadmap and New Features
    • JMESPath Reference
    • REST API
Powered by GitBook

Copyright© 2023 CloudTruth

On this page

Was this helpful?

  1. Config Management

Events, Notifications, Webhooks

Get notified when a change is made.

CloudTruth allows you to subscribe to events.

Use the example code below to configure sending a notification to a Slack channel.

POST to /api/v1/webhooks/ with a payload

{
  "name": "MyNewWebhook",
  "event_types": [
    "parameter_created"
  ],
  "type": "slack",
  "configuration": {
    "token": "string",
    "channel": "string",
    "username": "string"
  },
  "organization": "string"
}

organization is the organization ID for the installing org. I don't know how to advise a user to get this info and we might want to remove it from the request and just infer it in the same way we usually do.

event_types can be a list containing any combination of these items:

    "parameter_created"
    "parameter_updated"
    "parameter_deleted"
    "project_created"
    "project_updated"
    "project_deleted"
    "environment_created"
    "environment_updated"
    "environment_deleted"
    "value_created"
    "value_updated"
    "value_deleted"

type can only be slack, until we implement a different event handler

configuration is a JSON field that requires three keys (these are service-specific, this example is only for Slack):

{
    "token": <should be generated from Slack admin>,
    "channel": <should be the channel name to deliver messages to>,
    "username": <text to use for the username for the message into Slack>,
}

To generate a Slack API token:

  1. Click "Create New App"

  2. Select "From a manifest"

  3. Paste in the provided manifest (below)

  4. Click "Create"

  5. Click "OAuth & Permissions" on the left nav

  6. Click the "Install to " button

  7. Copy the generated Bot User OAuth Token

Slack App Manifest:

{
    "display_information": {
        "name": "CloudTruth Webhook"
    },
    "features": {
        "bot_user": {
            "display_name": "CloudTruth Webhook",
            "always_online": false
        }
    },
    "oauth_config": {
        "scopes": {
            "bot": [
                "chat:write.public",
                "chat:write"
            ]
        }
    },
    "settings": {
        "org_deploy_enabled": false,
        "socket_mode_enabled": false,
        "token_rotation_enabled": false
    }
}
PreviousCircle CINextTypes

Last updated 8 months ago

Was this helpful?

Go to

🛠️
https://api.slack.com/apps