Skip to main content

Config File

The Pluralith config file pluralith.yml resides in your Terraform project directory at the level you run your terraform or pluralith commands on. It contains various information the CLI needs regularly, such as project and org id, diagram title and author, paths to Terraform var files etc. It lives in your repo, can be committed and makes running Pluralith locally and in CI a breeze, eliminating the need to pass certain flags on every single command.

To initialize Pluralith on a Terraform project and create a config file in the current directory, run pluralith init and follow the wizard to create a valid pluralith.yml. Alternatively you can generate an empty config file by running pluralith init --empty and populate it yourself.

info

Details about pluralith init can be found here

Example

Below is an example of the pluralith.yml config file structure:

#  _
# |_)| _ _ |._|_|_
# | ||_|| (_||| | | |
#
# Welcome to Pluralith!
# https://www.pluralith.com
#
# This is your Pluralith config file
# Learn more about it at https://docs.pluralith.com/docs/more/config

org_id: # REQUIRED - ID of an existing Pluralith organization. Can be found in your dashboard.
project_id: # REQUIRED - ID for your project. If no project exists with given ID, a new one is created. Otherwise runs get pushed to existing project. (Can only contain lowercase letters, numbers and dashes (-)).
project_name: # REQUIRED - Name for your project. Will be used to create a new project if no project with previously specified ID exists yet.

config: # OPTIONAL - Various configurations for Terraform and Infracost under the hood
title: "" # Title to be shown in the exported diagram PDF
version: "" # Version to be shown in the exported diagram PDF
sync_to_backend: false # Specify whether to store a diagram as PDF in your state backend alongside your Terraform state
sensitive_attrs: # Specify which (sensitive) attributes the CLI should filter before generating the diagram
- "attribute_name"
- "attribute_name"
vars: # Specify variables to be passed to Terraform under the hood
- "NAME=VALUE"
- "NAME=VALUE"
var_files: # Specify paths to variable files to be passed to Terraform under the hood
- "./var_file.tfvars"
- "./var_file.tfvars"
cost_usage_file: "./usage_file.yml" # Specify a path to an infracost usage file

diagram: # See https://docs.pluralith.com/docs/more/diagram-customization for all options
hide:
- resourceType
- resourceType.resourceName