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
Copy file name to clipboardExpand all lines: README.md
+11-6Lines changed: 11 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -33,19 +33,24 @@ This module generates names using the following convention by default: `{namespa
33
33
However, it is highly configurable. The delimiter (e.g. `-`) is configurable. Each label item is optional (although you must provide at least one).
34
34
So if you prefer the term `stage` to `environment`
35
35
you can exclude environment and the label `id` will look like `{namespace}-{stage}-{name}-{attributes}`.
36
-
If attributes are excluded but `stage` and `environment` are included, `id` will look like `{namespace}-{environment}-{stage}-{name}`.
37
-
If you want the attributes in a different order, you can specify that, too, with the `label_order` list.
38
-
You can set a maximum length for the name, and the module will create a unique name that fits within that length.
36
+
- If attributes are excluded but `namespace`, `stage`, and `environment` are included, `id` will look like `{namespace}-{environment}-{stage}-{name}`.
37
+
- If you want the attributes in a different order, you can specify that, too, with the `label_order` list.
38
+
- You can set a maximum length for the name, and the module will create a unique name that fits within that length.
39
+
- You can control the letter case of the generated labels which make up the `id` using `var.label_value_case`.
40
+
- The labels are also exported as tags. You can control the case of the tag names (keys) using `var.label_tag_case`.
39
41
40
42
It's recommended to use one `terraform-null-label` module for every unique resource of a given resource type.
41
43
For example, if you have 10 instances, there should be 10 different labels.
42
44
However, if you have multiple different kinds of resources (e.g. instances, security groups, file systems, and elastic ips), then they can all share the same label assuming they are logically related.
43
45
44
46
All [Cloud Posse modules](https://github.com/cloudposse?utf8=%E2%9C%93&q=terraform-&type=&language=) use this module to ensure resources can be instantiated multiple times within an account and without conflict.
45
47
46
-
**NOTE:** The `null` refers to the primary Terraform [provider](https://www.terraform.io/docs/providers/null/index.html) used in this module.
48
+
**NOTE:** The `null` originally referred to the primary Terraform [provider](https://www.terraform.io/docs/providers/null/index.html) used in this module.
49
+
With Terraform 0.12, this module no longer needs any provider, but the name was kept for continuity.
47
50
48
-
Releases of this module from `0.12.0` onward support `HCL2` and only work with Terraform 0.12 or newer. Releases prior to this are compatible with earlier versions of terraform like Terraform 0.11.
51
+
- Releases of this module from `0.23.0` onward only work with Terraform 0.13 or newer.
52
+
- Releases of this module from `0.12.0` through `0.22.1` support `HCL2` and are compatible with Terraform 0.12 or newer.
53
+
- Releases of this module prior to `0.12.0` are compatible with earlier versions of terraform like Terraform 0.11.
49
54
50
55
51
56
---
@@ -693,7 +698,7 @@ No provider.
693
698
| delimiter | Delimiter to be used between `namespace`, `environment`, `stage`, `name` and `attributes`.<br>Defaults to `-` (hyphen). Set to `""` to use no delimiter at all. |`string`|`null`| no |
694
699
| enabled | Set to false to prevent the module from creating any resources |`bool`|`null`| no |
695
700
| environment | Environment, e.g. 'uw2', 'us-west-2', OR 'prod', 'staging', 'dev', 'UAT' |`string`|`null`| no |
696
-
| id\_length\_limit | Limit `id` to this many characters.<br>Set to `0` for unlimited length.<br>Set to `null` for default, which is `0`.<br>Does not affect `id_full`. |`number`|`null`| no |
701
+
| id\_length\_limit | Limit `id` to this many characters (minimum 6).<br>Set to `0` for unlimited length.<br>Set to `null` for default, which is `0`.<br>Does not affect `id_full`. |`number`|`null`| no |
697
702
| label\_key\_case | The letter case of label keys (`tag` names) (i.e. `name`, `namespace`, `environment`, `stage`, `attributes`) to use in `tags`.<br>Possible values: `lower`, `title`, `upper`.<br>Default value: `title`. |`string`|`null`| no |
698
703
| label\_order | The naming order of the id output and Name tag.<br>Defaults to ["namespace", "environment", "stage", "name", "attributes"].<br>You can omit any of the 5 elements, but at least one must be present. |`list(string)`|`null`| no |
699
704
| label\_value\_case | The letter case of output label values (also used in `tags` and `id`).<br>Possible values: `lower`, `title`, `upper` and `none` (no transformation).<br>Default value: `lower`. |`string`|`null`| no |
Copy file name to clipboardExpand all lines: README.yaml
+10-5Lines changed: 10 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -30,19 +30,24 @@ description: |-
30
30
However, it is highly configurable. The delimiter (e.g. `-`) is configurable. Each label item is optional (although you must provide at least one).
31
31
So if you prefer the term `stage` to `environment`
32
32
you can exclude environment and the label `id` will look like `{namespace}-{stage}-{name}-{attributes}`.
33
-
If attributes are excluded but `stage` and `environment` are included, `id` will look like `{namespace}-{environment}-{stage}-{name}`.
34
-
If you want the attributes in a different order, you can specify that, too, with the `label_order` list.
35
-
You can set a maximum length for the name, and the module will create a unique name that fits within that length.
33
+
- If attributes are excluded but `namespace`, `stage`, and `environment` are included, `id` will look like `{namespace}-{environment}-{stage}-{name}`.
34
+
- If you want the attributes in a different order, you can specify that, too, with the `label_order` list.
35
+
- You can set a maximum length for the name, and the module will create a unique name that fits within that length.
36
+
- You can control the letter case of the generated labels which make up the `id` using `var.label_value_case`.
37
+
- The labels are also exported as tags. You can control the case of the tag names (keys) using `var.label_tag_case`.
36
38
37
39
It's recommended to use one `terraform-null-label` module for every unique resource of a given resource type.
38
40
For example, if you have 10 instances, there should be 10 different labels.
39
41
However, if you have multiple different kinds of resources (e.g. instances, security groups, file systems, and elastic ips), then they can all share the same label assuming they are logically related.
40
42
41
43
All [Cloud Posse modules](https://github.com/cloudposse?utf8=%E2%9C%93&q=terraform-&type=&language=) use this module to ensure resources can be instantiated multiple times within an account and without conflict.
42
44
43
-
**NOTE:** The `null` refers to the primary Terraform [provider](https://www.terraform.io/docs/providers/null/index.html) used in this module.
45
+
**NOTE:** The `null` originally referred to the primary Terraform [provider](https://www.terraform.io/docs/providers/null/index.html) used in this module.
46
+
With Terraform 0.12, this module no longer needs any provider, but the name was kept for continuity.
44
47
45
-
Releases of this module from `0.12.0` onward support `HCL2` and only work with Terraform 0.12 or newer. Releases prior to this are compatible with earlier versions of terraform like Terraform 0.11.
48
+
- Releases of this module from `0.23.0` onward only work with Terraform 0.13 or newer.
49
+
- Releases of this module from `0.12.0` through `0.22.1` support `HCL2` and are compatible with Terraform 0.12 or newer.
50
+
- Releases of this module prior to `0.12.0` are compatible with earlier versions of terraform like Terraform 0.11.
Copy file name to clipboardExpand all lines: docs/terraform.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ No provider.
19
19
| delimiter | Delimiter to be used between `namespace`, `environment`, `stage`, `name` and `attributes`.<br>Defaults to `-` (hyphen). Set to `""` to use no delimiter at all. |`string`|`null`| no |
20
20
| enabled | Set to false to prevent the module from creating any resources |`bool`|`null`| no |
21
21
| environment | Environment, e.g. 'uw2', 'us-west-2', OR 'prod', 'staging', 'dev', 'UAT' |`string`|`null`| no |
22
-
| id\_length\_limit | Limit `id` to this many characters.<br>Set to `0` for unlimited length.<br>Set to `null` for default, which is `0`.<br>Does not affect `id_full`. |`number`|`null`| no |
22
+
| id\_length\_limit | Limit `id` to this many characters (minimum 6).<br>Set to `0` for unlimited length.<br>Set to `null` for default, which is `0`.<br>Does not affect `id_full`. |`number`|`null`| no |
23
23
| label\_key\_case | The letter case of label keys (`tag` names) (i.e. `name`, `namespace`, `environment`, `stage`, `attributes`) to use in `tags`.<br>Possible values: `lower`, `title`, `upper`.<br>Default value: `title`. |`string`|`null`| no |
24
24
| label\_order | The naming order of the id output and Name tag.<br>Defaults to ["namespace", "environment", "stage", "name", "attributes"].<br>You can omit any of the 5 elements, but at least one must be present. |`list(string)`|`null`| no |
25
25
| label\_value\_case | The letter case of output label values (also used in `tags` and `id`).<br>Possible values: `lower`, `title`, `upper` and `none` (no transformation).<br>Default value: `lower`. |`string`|`null`| no |
0 commit comments