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
  • Secrets with External values
  • Refreshing External Values

Was this helpful?

  1. Config Management
  2. Parameters
  3. Parameter Management

External Values

Referencing values from external integration sources.

PreviousDynamic ValuesNextTerraform Remote State Files

Last updated 1 year ago

Was this helpful?

In addition to setting internal parameter values directly within CloudTruth, parameters can be created with external values referencing CloudTruth's external . External values can be used as in any CloudTruth environment, and parameters can contain a mix of external and internal values.

First, set up CloudTruth integrations from your desired source.

Integration
Source Setup

Azure

AWS

AWS

AWS

GitHub

When creating or editing a parameter value, select the External value type.

You are now presented with an external value screen for setting integration source values. The Location window will display your configured integration sources. In the example below we have both an AWS and GitHub integration.

Integration

Source

External Selection

Type

AWS

JMESPath Query

file

AWS

Key Selection

String; StringList; SecureString

AWS

Key Selection

AWS secrets

GitHub

JMESPath Query

file

Key Selection

This example uses SSM to select a key TF_VAR_availability_zone_names which sets the CloudTruth value to ["us-west-2a", "us-west-2b"].

JMESPath File queries

  • JSON

  • XML

  • YAML

  • dotenv

  • tfstate

The following example uses a JMESpath selector timeout to set the externally referenced value of 500 from the JSON content in the integration into to our CloudTruth parameter. You can test your reference by clicking "See Value" in order to display the contents of the Referenced Value. If the JMESPath selector does not return a valid result, error details will be displayed.

JMESPath with XML

XML with or without node attributes can be searched with JMESPath, however the expression can be a bit tricky. Consider the following simple XML content:

<Data>
  <Super>Natural</Super>
  <Project name="chuck">
    <Parameter name="sam">dean</Parameter>
    <Parameter name="rowena">castiel</Parameter>
  </Project>
</Data>

A JMESPath query for Data.Super would give you the value Natural.

A JMESPath query for Data.Project.Parameter[?"@name"==`rowena`]."#text" | [0] would give you the value castiel. Let's break that down:

  1. Data.Project inspects each "Project", creating an array.

  2. Parameter[?"@name"==`rowena`] searches the array for a Parameter entry with a name attribute set to rowena.

  3. "#text" extracts the textual content of that node.

  4. | [0] takes the resulting array matches (from step 1), filtered by step 2 and returns the first one. Without this, the result is ['castiel'].

Secrets with External values

Since AWS Secrets manager values are always secure, secrets manager is locked at the top level.

AWS Parameter store will intelligently only lock Secure String values.

Refreshing External Values

Each time you use the integration explorer from the parameter edit panel, CloudTruth will read the content and store the value to satisfy configuration queries. You can also refresh all of the values CloudTruth is handling through an integration by visiting the Actions menu and selecting Import. Each integration has a mapped import action you can trigger from there to refresh all of the mapped external values for that integration.

In the future we plan to offer ways to keep the values synchronized automatically by watching the integration for changes through events and updating the values.

(AKV)

(SSM)

Depending on the source integration you will set an external value by selecting a key or querying a file for a key stored in your integration source file. We use the .

For integrations like AWS S3 and GitHub we use a to query for a specific key from a supported file type to reference the external value. The following file types are supported:

When referencing values from AWS Secrets Manager or Secure Strings from SSM the CloudTruth parameter must be in order to reference the secret value. If the CloudTruth Parameter is not marked as a secret the values will be locked.

🛠️
JMESPath query language
JMESPath selector
Azure Key Vault
S3
Parameter Store
S
ecrets Manger
Repositories
S3
Parameter Store
Secrets Manger
Repositories
integration sources
overrides
marked as a secret
JMESPath with JSON