v0.6.2
🤖 Automatic Updates
Update Terraform cloudposse/label/null to v0.24.1 @renovate (#16)
This PR contains the following updates:
Package | Type | Update | Change |
---|---|---|---|
cloudposse/label/null (source) | terraform | minor | 0.23.0 -> 0.24.1 |
Release Notes
cloudposse/terraform-null-label
v0.24.1
Allow control of letter case of outputs @SweetOps (#107)
You now have control over the letter case of generated tag names and supplied labels, which means you also have control over the letter case of the ultimate id
.
Labels are the elements you can include in label_order
, namely namespace
, environment
, stage
, name
, and attributes
. For every non-empty label, a corresponding tag name is generated. For namespace
, environment
, stage
, the output is the formatted, normalized input. (By "normalized" we mean that it goes through regex_replace_chars
.), For attributes
, which is a list, each element is normalized, duplicates are removed, and the resulting list is converted to a string by joining the elements with the delimiter
(defaults to hyphen). For name
, which is special, the output is the same as id
, which is the joining of the labels in the order specified by label_order
and separated by delimiter
.
- You can set
label_key_case
to one ofupper
,lower
, ortitle
, which will result in generatedtag
names in the corresponding case:NAME
,name
, orName
. For backwards compatibility,title
is the default - You can set
label_value_case
to one ofupper
,lower
,title
, ornone
, which will result in output label values in the corresponding case (withnone
meaning no case conversion of any kind will be done, though the labels will still be subject toregex_replace_chars
). The case converted labels will show up not just in the module output of the labels themselves, but also in thetag
values and in theid
string.
You can look at the test cases in examples/complete
and the expected results in test/src/examples_complete_test.go
to see examples of how this is supposed to work.
One interesting example is that you can create id
s in Pascal case by setting label_value_case = "title"
and delimiter = ""
.
Include updates to exports/context.tf @Nuru (#122 and #123)
##### what - Include updates to `exports/context.tf` - Update README with features and compatibilty - Add validation for `id_length_limit` ##### why - The `exports/context.tf` is what gets distributed and needs to be in sync - Replace outdated information - Was not validated earlier because validators are not supported in TF 0.12 but now we are dropping support for TF 0.12 and so we can add validatorsRestore backward compatibility with v0.22.1 and earlier @Nuru (#121)
##### what - Restore backward compatibility with v0.22.1 and earlier - Allow setting of `label_key_case` and `label_value_case` by vars, not just by context attributes. ##### why - Allow interoperability of old and new modules - Normally, root modules make settings via individual variables, not by setting an entire context block.Incorporates and closes #120
v0.24.0
Restore backward compatibility with v0.22.1 and earlier @Nuru (#121)
##### what - Restore backward compatibility with v0.22.1 and earlier - Allow setting of `label_key_case` and `label_value_case` by vars, not just by context attributes. ##### why - Allow interoperability of old and new modules - Normally, root modules make settings via individual variables, not by setting an entire context block.Incorporates and closes #120
Allow control of letter case of outputs @SweetOps (#107)
You now have control over the letter case of generated tag names and supplied labels, which means you also have control over the letter case of the ultimate id
.
Labels are the elements you can include in label_order
, namely namespace
, environment
, stage
, name
, and attributes
. For every non-empty label, a corresponding tag name is generated. For namespace
, environment
, stage
, the output is the formatted, normalized input. (By "normalized" we mean that it goes through regex_replace_chars
.), For attributes
, which is a list, each element is normalized, duplicates are removed, and the resulting list is converted to a string by joining the elements with the delimiter
(defaults to hyphen). For name
, which is special, the output is the same as id
, which is the joining of the labels in the order specified by label_order
and separated by delimiter
.
- You can set
label_key_case
to one ofupper
,lower
, ortitle
, which will result in generatedtag
names in the corresponding case:NAME
,name
, orName
. For backwards compatibility,title
is the default - You can set
label_value_case
to one ofupper
,lower
,title
, ornone
, which will result in output label values in the corresponding case (withnone
meaning no case conversion of any kind will be done, though the labels will still be subject toregex_replace_chars
). The case converted labels will show up not just in the module output of the labels themselves, but also in thetag
values and in theid
string.
You can look at the test cases in examples/complete
and the expected results in test/src/examples_complete_test.go
to see examples of how this is supposed to work.
One interesting example is that you can create id
s in Pascal case by setting label_value_case = "title"
and delimiter = ""
.