stack-config

cloudposse/stack-config/yaml

Terraform Module HCL YAML

Terraform module that loads an opinionated 'stack' configuration from local or remote YAML sources. It supports deep-merged variables, settings, ENV variables, backend config, and remote state outputs for Terraform and helmfile components.

Install
module "stack-config" {
source = "cloudposse/stack-config/yaml"
version = "2.0.0"
}
⭐ Source on GitHub 📦 Registry page
README

Terraform module that loads and processes an opinionated "stack" configuration from YAML sources using the terraform-provider-utils Terraform provider. It supports deep-merged variables, settings, ENV variables, backend config, remote state, and Spacelift stacks config outputs for Terraform and helmfile components. > [!TIP] > #### 👽 Use Atmos with Terraform > Cloud Posse uses atmos to easily orchestrate multiple environments using Terraform. > Works with Github Actions, Atlantis, or Spacelift. > > > Watch demo of using Atmos with Terraform > > Example of running atmos to manage infrastructure from our Quick Start tutorial. > Introduction The module is composed of the following sub-modules: - vars - accepts stack configuration and returns deep-merged variables for a Terraform or helmfile co

Inputs (22)
NameTypeDescriptionDefault
stack_config_local_pathstringPath to local stack configs required
stackslist(string)A list of infrastructure stack names required
enabledboolSet to false to prevent the module from creating any resourcesnull
environmentstringID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'stnull
namestringID element. Usually the component or solution name, e.g. 'app' or 'jenkins'. Thinull
delimiterstringDelimiter to be used between ID elements. Defaults to `-` (hyphen). Set to `""` null
regex_replace_charsstringTerraform regular expression (regex) string. Characters matching the regex will null
contextanySingle object for setting entire context at once. See description of individual { "additional_tag_map": {}, "attribu
tenantstringID element _(Rarely used, not included by default)_. A customer identifier, indinull
labels_as_tagsset(string)Set of labels (ID elements) to include as tags in the `tags` output. Default is [ "default" ]
label_orderlist(string)The order in which the labels (ID elements) appear in the `id`. Defaults to ["nanull
component_deps_processing_enabledboolBoolean flag to enable/disable processing stack config dependencies for the compfalse
namespacestringID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp'null
attributeslist(string)ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`, []
tagsmap(string)Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`). Neither the tag keys nor the t{}
label_key_casestringControls the letter case of the `tags` keys (label names) for tags generated by null
label_value_casestringControls the letter case of ID elements (labels) as included in `id`, set as tagnull
stack_deps_processing_enabledboolBoolean flag to enable/disable processing all stack dependencies in the providedfalse
stagestringID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'bunull
additional_tag_mapmap(string)Additional key-value pairs to add to each map in `tags_as_list_of_maps`. Not add{}
id_length_limitnumberLimit `id` to this many characters (minimum 6). Set to `0` for unlimited length.null
descriptor_formatsanyDescribe additional descriptors to be output in the `descriptors` output map. Ma{}
Outputs (1)
config — Stack configurations
Details
FrameworkTerraform Module
LanguageHCL
Version2.0.0
Cloud YAML
★ Stars52
Forks22
Total downloads27.4M
Inputs22
Outputs1
Examples6
Submodules7
LicenseApache-2.0
Namespacecloudposse
Updated