module

cloudposse/module/example

Terraform Module HCL EXAMPLE

Example Terraform Module Scaffolding

Install
module "module" {
source = "cloudposse/module/example"
version = "3.0.1"
}
⭐ Source on GitHub 📦 Registry page
README

Short description > [!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 This is an introduction. Usage For a complete example, see examples/complete. For automated tests of the complete example using bats and Terratest (which tests and deploys the example on AWS), see test. ``hcl Create a standard label resource. See null-label module "label" { source = "cloudposse/label/null" # Cloud Posse recommends pinning every module to a specific version, though usually you want to use the current one # version = "x.x.x" namespace

Inputs (19)
NameTypeDescriptionDefault
environmentstringID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'stnull
labels_as_tagsset(string)Set of labels (ID elements) to include as tags in the `tags` output. Default is [ "default" ]
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
enabledboolSet to false to prevent the module from creating any resourcesnull
additional_tag_mapmap(string)Additional key-value pairs to add to each map in `tags_as_list_of_maps`. Not add{}
label_orderlist(string)The order in which the labels (ID elements) appear in the `id`. Defaults to ["nanull
label_value_casestringControls the letter case of ID elements (labels) as included in `id`, set as tagnull
descriptor_formatsanyDescribe additional descriptors to be output in the `descriptors` output map. Ma{}
tenantstringID element _(Rarely used, not included by default)_. A customer identifier, indinull
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{}
id_length_limitnumberLimit `id` to this many characters (minimum 6). Set to `0` for unlimited length.null
stagestringID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'bunull
namestringID element. Usually the component or solution name, e.g. 'app' or 'jenkins'. Thinull
label_key_casestringControls the letter case of the `tags` keys (label names) for tags generated by null
examplestringExample variable"hello world"
namespacestringID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp'null
delimiterstringDelimiter to be used between ID elements. Defaults to `-` (hyphen). Set to `""` null
Outputs (3)
random — Stable random number for this example
id — ID of the created example
example — Example output
Resources (1)
random_integer
Details
FrameworkTerraform Module
LanguageHCL
Version3.0.1
Cloud EXAMPLE
★ Stars170
Forks73
Total downloads23.1k
Inputs19
Outputs3
Resources1
Examples1
LicenseApache-2.0
Namespacecloudposse
Updated