You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some companies may have different patterns for the component name tag. By using this solution, they may change it.
Code suggestion
locals {
# Throw an error if lookup failscheck_required_tags=module.this.enabled? [
forkinvar.required_tags:lookup(module.this.tags, k)
] : []
}
variable"required_tags" {
type=list(string)
description="List of required tag names"default=[]
}
variable"component_tag" {
type=stringdescription="The name of the tag that will be used to identify the component"default="IacComponent"
}
# `introspection` module will contain the additional tagsmodule"introspection" {
source="cloudposse/label/null"version="0.25.0"tags=merge(var.tags, {
format("%s", var.component_tag) = basename(abspath(path.module))
})
context=module.this.context
}
The text was updated successfully, but these errors were encountered:
Describe the Feature
Instead of a fixed value, set the component name tag using a variable.
Expected Behavior
By setting
Obtain:
Use Case
Some companies may have different patterns for the component name tag. By using this solution, they may change it.
Code suggestion
The text was updated successfully, but these errors were encountered: