Skip to content

Commit 2428b46

Browse files
authored
Fix: Update README Snippets (#130)
1 parent cf38625 commit 2428b46

File tree

7 files changed

+157
-93
lines changed

7 files changed

+157
-93
lines changed

.github/CODEOWNERS

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Use this file to define individuals or teams that are responsible for code in a repository.
22
# Read more: <https://help.github.com/articles/about-codeowners/>
33
#
4-
# Order is important: the last matching pattern takes the most precedence
4+
# Order is important: the last matching pattern has the highest precedence
55

66
# These owners will be the default owners for everything
77
* @cloudposse/engineering @cloudposse/contributors
@@ -13,5 +13,13 @@
1313
# Cloud Posse must review any changes to GitHub actions
1414
.github/* @cloudposse/engineering
1515

16-
# Cloud Posse must review any changes to standard context definition
17-
**/context.tf @cloudposse/engineering
16+
# Cloud Posse must review any changes to standard context definition,
17+
# but some changes can be rubber-stamped.
18+
**/*.tf @cloudposse/engineering @cloudposse/contributors @cloudposse/approvers
19+
README.yaml @cloudposse/engineering @cloudposse/contributors @cloudposse/approvers
20+
README.md @cloudposse/engineering @cloudposse/contributors @cloudposse/approvers
21+
docs/*.md @cloudposse/engineering @cloudposse/contributors @cloudposse/approvers
22+
23+
# Cloud Posse Admins must review all changes to CODEOWNERS or the mergify configuration
24+
.github/mergify.yml @cloudposse/admins
25+
.github/CODEOWNERS @cloudposse/admins

.github/auto-release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ template: |
4646
4747
replacers:
4848
# Remove irrelevant information from Renovate bot
49-
- search: '/---\s+^#.*Renovate configuration(?:.|\n)*?This PR has been generated .*/gm'
49+
- search: '/(?<=---\s+)+^#.*(Renovate configuration|Configuration)(?:.|\n)*?This PR has been generated .*/gm'
5050
replace: ''
5151
# Remove Renovate bot banner image
5252
- search: '/\[!\[[^\]]*Renovate\][^\]]*\](\([^)]*\))?\s*\n+/gm'

.github/workflows/auto-format.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
jobs:
77
auto-format:
88
runs-on: ubuntu-latest
9-
container: cloudposse/build-harness:slim-latest
9+
container: cloudposse/build-harness:latest
1010
steps:
1111
# Checkout the pull request branch
1212
# "An action in a workflow run can’t trigger a new workflow run. For example, if an action pushes code using
@@ -29,6 +29,8 @@ jobs:
2929
- name: Auto Format
3030
if: github.event.pull_request.state == 'open'
3131
shell: bash
32+
env:
33+
GITHUB_TOKEN: "${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}"
3234
run: make BUILD_HARNESS_PATH=/build-harness PACKAGES_PREFER_HOST=true -f /build-harness/templates/Makefile.build-harness pr/auto-format/host
3335

3436
# Commit changes (if any) to the PR branch

.github/workflows/validate-codeowners.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: Validate Codeowners
22
on:
3+
workflow_dispatch:
4+
35
pull_request:
46

57
jobs:

README.md

+72-47
Large diffs are not rendered by default.

README.yaml

+26-6
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ usage: |-
7272
7373
```hcl
7474
module "eg_prod_bastion_label" {
75-
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=master"
75+
source = "cloudposse/label/null"
76+
# Cloud Posse recommends pinning every module to a specific version
77+
# version = "x.x.x"
78+
7679
namespace = "eg"
7780
stage = "prod"
7881
name = "bastion"
@@ -123,7 +126,10 @@ usage: |-
123126
124127
```hcl
125128
module "eg_prod_bastion_abc_label" {
126-
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=master"
129+
source = "cloudposse/label/null"
130+
# Cloud Posse recommends pinning every module to a specific version
131+
# version = "x.x.x"
132+
127133
namespace = "eg"
128134
stage = "prod"
129135
name = "bastion"
@@ -154,7 +160,10 @@ usage: |-
154160
}
155161
156162
module "eg_prod_bastion_xyz_label" {
157-
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=master"
163+
source = "cloudposse/label/null"
164+
# Cloud Posse recommends pinning every module to a specific version
165+
# version = "x.x.x"
166+
158167
namespace = "eg"
159168
stage = "prod"
160169
name = "bastion"
@@ -292,7 +301,10 @@ usage: |-
292301
293302
```hcl
294303
module "label1" {
295-
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=master"
304+
source = "cloudposse/label/null"
305+
# Cloud Posse recommends pinning every module to a specific version
306+
# version = "x.x.x"
307+
296308
namespace = "CloudPosse"
297309
environment = "UAT"
298310
stage = "build"
@@ -309,7 +321,10 @@ usage: |-
309321
}
310322
311323
module "label2" {
312-
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=master"
324+
source = "cloudposse/label/null"
325+
# Cloud Posse recommends pinning every module to a specific version
326+
# version = "x.x.x"
327+
313328
context = module.label1.context
314329
name = "Charlie"
315330
stage = "test"
@@ -322,7 +337,10 @@ usage: |-
322337
}
323338
324339
module "label3" {
325-
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=master"
340+
source = "cloudposse/label/null"
341+
# Cloud Posse recommends pinning every module to a specific version
342+
# version = "x.x.x"
343+
326344
name = "Starfish"
327345
stage = "release"
328346
context = module.label1.context
@@ -616,3 +634,5 @@ contributors:
616634
github: maartenvanderhoef
617635
- name: Adam Tibbing
618636
github: tibbing
637+
- name: Yonatan Koren
638+
github: korenyoni

docs/terraform.md

+42-35
Original file line numberDiff line numberDiff line change
@@ -3,52 +3,59 @@
33

44
| Name | Version |
55
|------|---------|
6-
| terraform | >= 0.13.0 |
6+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.0 |
77

88
## Providers
99

10-
No provider.
10+
No providers.
11+
12+
## Modules
13+
14+
No modules.
15+
16+
## Resources
17+
18+
No resources.
1119

1220
## Inputs
1321

1422
| Name | Description | Type | Default | Required |
1523
|------|-------------|------|---------|:--------:|
16-
| additional\_tag\_map | Additional tags for appending to tags\_as\_list\_of\_maps. Not added to `tags`. | `map(string)` | `{}` | no |
17-
| attributes | Additional attributes (e.g. `1`) | `list(string)` | `[]` | no |
18-
| context | Single object for setting entire context at once.<br>See description of individual variables for details.<br>Leave string and numeric variables as `null` to use default value.<br>Individual variable settings (non-null) override settings in context object,<br>except for attributes, tags, and additional\_tag\_map, which are merged. | `any` | <pre>{<br> "additional_tag_map": {},<br> "attributes": [],<br> "delimiter": null,<br> "enabled": true,<br> "environment": null,<br> "id_length_limit": null,<br> "label_key_case": null,<br> "label_order": [],<br> "label_value_case": null,<br> "name": null,<br> "namespace": null,<br> "regex_replace_chars": null,<br> "stage": null,<br> "tags": {}<br>}</pre> | no |
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-
| enabled | Set to false to prevent the module from creating any resources | `bool` | `null` | no |
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 (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-
| 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-
| 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-
| 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 |
26-
| name | Solution name, e.g. 'app' or 'jenkins' | `string` | `null` | no |
27-
| namespace | Namespace, which could be your organization name or abbreviation, e.g. 'eg' or 'cp' | `string` | `null` | no |
28-
| regex\_replace\_chars | Regex to replace chars with empty string in `namespace`, `environment`, `stage` and `name`.<br>If not set, `"/[^a-zA-Z0-9-]/"` is used to remove all characters other than hyphens, letters and digits. | `string` | `null` | no |
29-
| stage | Stage, e.g. 'prod', 'staging', 'dev', OR 'source', 'build', 'test', 'deploy', 'release' | `string` | `null` | no |
30-
| tags | Additional tags (e.g. `map('BusinessUnit','XYZ')` | `map(string)` | `{}` | no |
24+
| <a name="input_additional_tag_map"></a> [additional\_tag\_map](#input\_additional\_tag\_map) | Additional tags for appending to tags\_as\_list\_of\_maps. Not added to `tags`. | `map(string)` | `{}` | no |
25+
| <a name="input_attributes"></a> [attributes](#input\_attributes) | Additional attributes (e.g. `1`) | `list(string)` | `[]` | no |
26+
| <a name="input_context"></a> [context](#input\_context) | Single object for setting entire context at once.<br>See description of individual variables for details.<br>Leave string and numeric variables as `null` to use default value.<br>Individual variable settings (non-null) override settings in context object,<br>except for attributes, tags, and additional\_tag\_map, which are merged. | `any` | <pre>{<br> "additional_tag_map": {},<br> "attributes": [],<br> "delimiter": null,<br> "enabled": true,<br> "environment": null,<br> "id_length_limit": null,<br> "label_key_case": null,<br> "label_order": [],<br> "label_value_case": null,<br> "name": null,<br> "namespace": null,<br> "regex_replace_chars": null,<br> "stage": null,<br> "tags": {}<br>}</pre> | no |
27+
| <a name="input_delimiter"></a> [delimiter](#input\_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 |
28+
| <a name="input_enabled"></a> [enabled](#input\_enabled) | Set to false to prevent the module from creating any resources | `bool` | `null` | no |
29+
| <a name="input_environment"></a> [environment](#input\_environment) | Environment, e.g. 'uw2', 'us-west-2', OR 'prod', 'staging', 'dev', 'UAT' | `string` | `null` | no |
30+
| <a name="input_id_length_limit"></a> [id\_length\_limit](#input\_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 |
31+
| <a name="input_label_key_case"></a> [label\_key\_case](#input\_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 |
32+
| <a name="input_label_order"></a> [label\_order](#input\_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 |
33+
| <a name="input_label_value_case"></a> [label\_value\_case](#input\_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 |
34+
| <a name="input_name"></a> [name](#input\_name) | Solution name, e.g. 'app' or 'jenkins' | `string` | `null` | no |
35+
| <a name="input_namespace"></a> [namespace](#input\_namespace) | Namespace, which could be your organization name or abbreviation, e.g. 'eg' or 'cp' | `string` | `null` | no |
36+
| <a name="input_regex_replace_chars"></a> [regex\_replace\_chars](#input\_regex\_replace\_chars) | Regex to replace chars with empty string in `namespace`, `environment`, `stage` and `name`.<br>If not set, `"/[^a-zA-Z0-9-]/"` is used to remove all characters other than hyphens, letters and digits. | `string` | `null` | no |
37+
| <a name="input_stage"></a> [stage](#input\_stage) | Stage, e.g. 'prod', 'staging', 'dev', OR 'source', 'build', 'test', 'deploy', 'release' | `string` | `null` | no |
38+
| <a name="input_tags"></a> [tags](#input\_tags) | Additional tags (e.g. `map('BusinessUnit','XYZ')` | `map(string)` | `{}` | no |
3139

3240
## Outputs
3341

3442
| Name | Description |
3543
|------|-------------|
36-
| additional\_tag\_map | The merged additional\_tag\_map |
37-
| attributes | List of attributes |
38-
| context | Merged but otherwise unmodified input to this module, to be used as context input to other modules.<br>Note: this version will have null values as defaults, not the values actually used as defaults. |
39-
| delimiter | Delimiter between `namespace`, `environment`, `stage`, `name` and `attributes` |
40-
| enabled | True if module is enabled, false otherwise |
41-
| environment | Normalized environment |
42-
| id | Disambiguated ID restricted to `id_length_limit` characters in total |
43-
| id\_full | Disambiguated ID not restricted in length |
44-
| id\_length\_limit | The id\_length\_limit actually used to create the ID, with `0` meaning unlimited |
45-
| label\_order | The naming order actually used to create the ID |
46-
| name | Normalized name |
47-
| namespace | Normalized namespace |
48-
| normalized\_context | Normalized context of this module |
49-
| regex\_replace\_chars | The regex\_replace\_chars actually used to create the ID |
50-
| stage | Normalized stage |
51-
| tags | Normalized Tag map |
52-
| tags\_as\_list\_of\_maps | Additional tags as a list of maps, which can be used in several AWS resources |
53-
44+
| <a name="output_additional_tag_map"></a> [additional\_tag\_map](#output\_additional\_tag\_map) | The merged additional\_tag\_map |
45+
| <a name="output_attributes"></a> [attributes](#output\_attributes) | List of attributes |
46+
| <a name="output_context"></a> [context](#output\_context) | Merged but otherwise unmodified input to this module, to be used as context input to other modules.<br>Note: this version will have null values as defaults, not the values actually used as defaults. |
47+
| <a name="output_delimiter"></a> [delimiter](#output\_delimiter) | Delimiter between `namespace`, `environment`, `stage`, `name` and `attributes` |
48+
| <a name="output_enabled"></a> [enabled](#output\_enabled) | True if module is enabled, false otherwise |
49+
| <a name="output_environment"></a> [environment](#output\_environment) | Normalized environment |
50+
| <a name="output_id"></a> [id](#output\_id) | Disambiguated ID restricted to `id_length_limit` characters in total |
51+
| <a name="output_id_full"></a> [id\_full](#output\_id\_full) | Disambiguated ID not restricted in length |
52+
| <a name="output_id_length_limit"></a> [id\_length\_limit](#output\_id\_length\_limit) | The id\_length\_limit actually used to create the ID, with `0` meaning unlimited |
53+
| <a name="output_label_order"></a> [label\_order](#output\_label\_order) | The naming order actually used to create the ID |
54+
| <a name="output_name"></a> [name](#output\_name) | Normalized name |
55+
| <a name="output_namespace"></a> [namespace](#output\_namespace) | Normalized namespace |
56+
| <a name="output_normalized_context"></a> [normalized\_context](#output\_normalized\_context) | Normalized context of this module |
57+
| <a name="output_regex_replace_chars"></a> [regex\_replace\_chars](#output\_regex\_replace\_chars) | The regex\_replace\_chars actually used to create the ID |
58+
| <a name="output_stage"></a> [stage](#output\_stage) | Normalized stage |
59+
| <a name="output_tags"></a> [tags](#output\_tags) | Normalized Tag map |
60+
| <a name="output_tags_as_list_of_maps"></a> [tags\_as\_list\_of\_maps](#output\_tags\_as\_list\_of\_maps) | Additional tags as a list of maps, which can be used in several AWS resources |
5461
<!-- markdownlint-restore -->

0 commit comments

Comments
 (0)