From fa7c1d0ecf851ce65b9bc4f3b5fd86ed6f352af5 Mon Sep 17 00:00:00 2001 From: "Erik Osterman (CEO @ Cloud Posse)" Date: Fri, 8 Mar 2024 22:06:55 -0600 Subject: [PATCH] chore: Update Scaffolding (#150) --- .github/mergify.yml | 62 +-------- README.md | 307 +++++++++++++++----------------------------- README.yaml | 85 +++++------- 3 files changed, 135 insertions(+), 319 deletions(-) diff --git a/.github/mergify.yml b/.github/mergify.yml index 5c4b54f..526045d 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -1,61 +1 @@ -# https://docs.mergify.io/conditions.html -# https://docs.mergify.io/actions.html -pull_request_rules: -- name: "approve automated PRs that have passed checks" - conditions: - - "base=main" - - "-closed" - - "head~=^(auto-update|renovate)/.*" - - "check-success=terraform-module / ci" - - "and: *common_checks" - - "sender-permission>=write" - actions: - review: - type: "APPROVE" - bot_account: "cloudposse-mergebot" - message: "We've automatically approved this PR because the checks from the automated Pull Request have passed." - -- name: "merge automated PRs when approved and tests pass" - conditions: - - "base=main" - - "-closed" - - "head~=^(auto-update|renovate)/.*" - - "check-success=terraform-module / ci" - - "and: *common_checks" - - "#approved-reviews-by>=1" - - "#changes-requested-reviews-by=0" - - "#commented-reviews-by=0" - - "sender-permission>=write" - actions: - merge: - method: "squash" - -- name: "delete the head branch after merge" - conditions: - - "merged" - actions: - delete_head_branch: {} - -- name: "ask to resolve conflict" - conditions: - - "conflict" - - "-closed" - actions: - comment: - message: "This pull request has conflicts, please resolve." - -- name: "remove outdated reviews" - conditions: - - "base=main" - actions: - dismiss_reviews: - changes_requested: true - approved: true - message: "This Pull Request has been updated, so we're dismissing all reviews." - -- name: "close PRs with no files changed" - conditions: - - "#files=0" - actions: - close: - message: "This pull request has been automatically closed by Mergify because there are no longer any changes." +extends: .github diff --git a/README.md b/README.md index a3ed7f7..11f5adf 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,10 @@ + -# terraform-null-label [![Latest Release](https://img.shields.io/github/release/cloudposse/terraform-null-label.svg)](https://github.com/cloudposse/terraform-null-label/releases/latest) [![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com) +# terraform-null-label +Latest ReleaseLast UpdatedSlack Community -[![README Header][readme_header_img]][readme_header_link] - -[![Cloud Posse][logo]](https://cpco.io/homepage) - -| [![Erik Osterman][osterman_avatar]][osterman_homepage]
[Erik Osterman][osterman_homepage] | [![Andriy Knysh][aknysh_avatar]][aknysh_homepage]
[Andriy Knysh][aknysh_homepage] | [![Igor Rodionov][goruha_avatar]][goruha_homepage]
[Igor Rodionov][goruha_homepage] | [![Sergey Vasilyev][s2504s_avatar]][s2504s_homepage]
[Sergey Vasilyev][s2504s_homepage] | [![Michael Pereira][MichaelPereira_avatar]][MichaelPereira_homepage]
[Michael Pereira][MichaelPereira_homepage] | [![Jamie Nelson][Jamie-BitFlight_avatar]][Jamie-BitFlight_homepage]
[Jamie Nelson][Jamie-BitFlight_homepage] | [![Vladimir][SweetOps_avatar]][SweetOps_homepage]
[Vladimir][SweetOps_homepage] | [![Daren Desjardins][darend_avatar]][darend_homepage]
[Daren Desjardins][darend_homepage] | [![Maarten van der Hoef][maartenvanderhoef_avatar]][maartenvanderhoef_homepage]
[Maarten van der Hoef][maartenvanderhoef_homepage] | [![Adam Tibbing][tibbing_avatar]][tibbing_homepage]
[Adam Tibbing][tibbing_homepage] | [![Yonatan Koren][korenyoni_avatar]][korenyoni_homepage]
[Yonatan Koren][korenyoni_homepage] | -|---|---|---|---|---|---|---|---|---|---|---| - - - [osterman_homepage]: https://github.com/osterman - [osterman_avatar]: https://img.cloudposse.com/150x150/https://github.com/osterman.png - [aknysh_homepage]: https://github.com/aknysh - [aknysh_avatar]: https://img.cloudposse.com/150x150/https://github.com/aknysh.png - [goruha_homepage]: https://github.com/goruha - [goruha_avatar]: https://img.cloudposse.com/150x150/https://github.com/goruha.png - [s2504s_homepage]: https://github.com/s2504s - [s2504s_avatar]: https://img.cloudposse.com/150x150/https://github.com/s2504s.png - [MichaelPereira_homepage]: https://github.com/MichaelPereira - [MichaelPereira_avatar]: https://img.cloudposse.com/150x150/https://github.com/MichaelPereira.png - [Jamie-BitFlight_homepage]: https://github.com/Jamie-BitFlight - [Jamie-BitFlight_avatar]: https://img.cloudposse.com/150x150/https://github.com/Jamie-BitFlight.png - [SweetOps_homepage]: https://github.com/SweetOps - [SweetOps_avatar]: https://img.cloudposse.com/150x150/https://github.com/SweetOps.png - [darend_homepage]: https://github.com/darend - [darend_avatar]: https://img.cloudposse.com/150x150/https://github.com/darend.png - [maartenvanderhoef_homepage]: https://github.com/maartenvanderhoef - [maartenvanderhoef_avatar]: https://img.cloudposse.com/150x150/https://github.com/maartenvanderhoef.png - [tibbing_homepage]: https://github.com/tibbing - [tibbing_avatar]: https://img.cloudposse.com/150x150/https://github.com/tibbing.png - [korenyoni_homepage]: https://github.com/korenyoni - [korenyoni_avatar]: https://img.cloudposse.com/150x150/https://github.com/korenyoni.png - -[![README Footer][readme_footer_img]][readme_footer_link] -[![Beacon][beacon]][website] - - [logo]: https://cloudposse.com/logo-300x69.svg - [docs]: https://cpco.io/docs?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-null-label&utm_content=docs - [website]: https://cpco.io/homepage?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-null-label&utm_content=website - [github]: https://cpco.io/github?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-null-label&utm_content=github - [jobs]: https://cpco.io/jobs?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-null-label&utm_content=jobs - [hire]: https://cpco.io/hire?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-null-label&utm_content=hire - [slack]: https://cpco.io/slack?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-null-label&utm_content=slack - [linkedin]: https://cpco.io/linkedin?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-null-label&utm_content=linkedin - [twitter]: https://cpco.io/twitter?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-null-label&utm_content=twitter - [testimonial]: https://cpco.io/leave-testimonial?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-null-label&utm_content=testimonial - [office_hours]: https://cloudposse.com/office-hours?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-null-label&utm_content=office_hours - [newsletter]: https://cpco.io/newsletter?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-null-label&utm_content=newsletter - [discourse]: https://ask.sweetops.com/?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-null-label&utm_content=discourse - [email]: https://cpco.io/email?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-null-label&utm_content=email - [commercial_support]: https://cpco.io/commercial-support?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-null-label&utm_content=commercial_support - [we_love_open_source]: https://cpco.io/we-love-open-source?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-null-label&utm_content=we_love_open_source - [terraform_modules]: https://cpco.io/terraform-modules?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-null-label&utm_content=terraform_modules - [readme_header_img]: https://cloudposse.com/readme/header/img - [readme_header_link]: https://cloudposse.com/readme/header/link?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-null-label&utm_content=readme_header_link - [readme_footer_img]: https://cloudposse.com/readme/footer/img - [readme_footer_link]: https://cloudposse.com/readme/footer/link?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-null-label&utm_content=readme_footer_link - [readme_commercial_support_img]: https://cloudposse.com/readme/commercial-support/img - [readme_commercial_support_link]: https://cloudposse.com/readme/commercial-support/link?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-null-label&utm_content=readme_commercial_support_link - [share_twitter]: https://twitter.com/intent/tweet/?text=terraform-null-label&url=https://github.com/cloudposse/terraform-null-label - [share_linkedin]: https://www.linkedin.com/shareArticle?mini=true&title=terraform-null-label&url=https://github.com/cloudposse/terraform-null-label - [share_reddit]: https://reddit.com/submit/?url=https://github.com/cloudposse/terraform-null-label - [share_facebook]: https://facebook.com/sharer/sharer.php?u=https://github.com/cloudposse/terraform-null-label - [share_googleplus]: https://plus.google.com/share?url=https://github.com/cloudposse/terraform-null-label - [share_email]: mailto:?subject=terraform-null-label&body=https://github.com/cloudposse/terraform-null-label - [beacon]: https://ga-beacon.cloudposse.com/UA-76589703-4/cloudposse/terraform-null-label?pixel&cs=github&cm=readme&an=terraform-null-label - +Beacon diff --git a/README.yaml b/README.yaml index e24b77c..fcdc6de 100644 --- a/README.yaml +++ b/README.yaml @@ -1,23 +1,26 @@ name: terraform-null-label tags: -- aws -- terraform -- terraform-modules -- naming-convention -- name -- namespace -- stage + - aws + - terraform + - terraform-modules + - naming-convention + - name + - namespace + - stage categories: -- terraform-modules/supported + - terraform-modules/supported license: APACHE2 github_repo: cloudposse/terraform-null-label badges: -- name: Latest Release - image: https://img.shields.io/github/release/cloudposse/terraform-null-label.svg - url: https://github.com/cloudposse/terraform-null-label/releases/latest -- name: Slack Community - image: https://slack.cloudposse.com/badge.svg - url: https://slack.cloudposse.com + - name: Latest Release + image: https://img.shields.io/github/release/cloudposse/terraform-null-label.svg?style=for-the-badge + url: https://github.com/cloudposse/terraform-null-label/releases/latest + - name: Last Updated + image: https://img.shields.io/github/last-commit/cloudposse/terraform-null-label.svg?style=for-the-badge + url: https://github.com/cloudposse/terraform-null-label/commits + - name: Slack Community + image: https://slack.cloudposse.com/for-the-badge.svg + url: https://slack.cloudposse.com description: |- Terraform module designed to generate consistent names and tags for resources. Use `terraform-null-label` to implement a strict naming convention. @@ -28,7 +31,7 @@ description: |- 1. stage 1. name 1. attributes - + This module generates IDs using the following convention by default: `{namespace}-{environment}-{stage}-{name}-{attributes}`. However, it is highly configurable. The delimiter (e.g. `-`) is configurable. Each label item is optional (although you must provide at least one). So if you prefer the term `stage` to `environment` and do not need `tenant`, you can exclude them @@ -64,7 +67,7 @@ description: |- the `descriptors` output, which is a map of strings generated according to the format specified by the `descriptor_formats` input. This feature is intentionally simple and minimally configurable and will not be enhanced to add more features that are already in `null-label`. See [examples/complete/descriptors.tf](examples/complete/descriptors.tf) for examples. - + All [Cloud Posse Terraform 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. The Cloud Posse convention is to use labels as follows: @@ -73,7 +76,7 @@ description: |- - `environment`: A [short abbreviation](https://github.com/cloudposse/terraform-aws-utils/#introduction) for the AWS region hosting the resource, or `gbl` for resources like IAM roles that have no region - `stage`: The name or role of the account the resource is for, such as `prod` or `dev` - `name`: The name of the component that owns the resources, such as `eks` or `rds` - + **NOTE:** The `null` originally referred to the primary Terraform [provider](https://www.terraform.io/docs/providers/null/index.html) used in this module. With Terraform 0.12, this module no longer needs any provider, but the name was kept for continuity. @@ -99,7 +102,7 @@ usage: |- becomes the new default for downstream modules. Also, collections are not overwritten, they are merged, so once a tag is added, it will remain in the tag set and cannot be removed, although its value can be overwritten. - + Because the purpose of `labels_as_tags` is primarily to prevent tags from being generated that would [conflict with the AWS provider's `default_tags`](https://github.com/hashicorp/terraform-provider-aws/issues/19204), it is an exception to the rule that variables override the setting in the context object. The value in the context @@ -166,7 +169,7 @@ usage: |- source = "cloudposse/label/null" # Cloud Posse recommends pinning every module to a specific version # version = "x.x.x" - + namespace = "eg" stage = "prod" name = "bastion" @@ -177,14 +180,14 @@ usage: |- "Snapshot" = "true" } } - + module "eg_prod_bastion_abc_label" { source = "cloudposse/label/null" # Cloud Posse recommends pinning every module to a specific version # version = "x.x.x" - + attributes = ["abc"] - + tags = { "BusinessUnit" = "ABC" # Override the Business Unit tag set in the base label } @@ -192,7 +195,7 @@ usage: |- # Copy all other fields from the base label context = module.eg_prod_bastion_label.context } - + resource "aws_security_group" "eg_prod_bastion_abc" { name = module.eg_prod_bastion_abc_label.id tags = module.eg_prod_bastion_abc_label.tags @@ -216,7 +219,7 @@ usage: |- # version = "x.x.x" attributes = ["xyz"] - + context = module.eg_prod_bastion_label.context } @@ -375,7 +378,7 @@ usage: |- stage = "test" delimiter = "+" regex_replace_chars = "/[^a-zA-Z0-9-+]/" - + additional_tag_map = { propagate_at_launch = true additional_tag = "yes" @@ -385,7 +388,7 @@ usage: |- "City" = "London" "Environment" = "Public" } - + context = module.label1.context } @@ -403,7 +406,7 @@ usage: |- "Eat" = "Carrot" "Animal" = "Rabbit" } - + context = module.label1.context } ``` @@ -697,28 +700,6 @@ usage: |- include: -- docs/targets.md -- docs/terraform.md -contributors: -- name: Erik Osterman - github: osterman -- name: Andriy Knysh - github: aknysh -- name: Igor Rodionov - github: goruha -- name: Sergey Vasilyev - github: s2504s -- name: Michael Pereira - github: MichaelPereira -- name: Jamie Nelson - github: Jamie-BitFlight -- name: Vladimir - github: SweetOps -- name: Daren Desjardins - github: darend -- name: Maarten van der Hoef - github: maartenvanderhoef -- name: Adam Tibbing - github: tibbing -- name: Yonatan Koren - github: korenyoni + - docs/targets.md + - docs/terraform.md +contributors: []