Skip to content

Conversation

milldr
Copy link
Member

@milldr milldr commented Mar 8, 2024

what

  • Added prettier to format all Markdown files
  • Added ignore wrapper for terraform-docs formatted tables
  • Added new lines after all admonitions as such:
#!/bin/bash

replace_strings=(
"<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->/<!-- prettier-ignore-start -->\n<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->"
"<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->/<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->\n<!-- prettier-ignore-end -->"
":::info/:::info\n"
":::important/:::important\n"
":::warning/:::warning\n"
":::caution/:::caution\n"
)

for rs in "${replace_strings[@]}"
do
  echo ${rs}
  LC_ALL=C find terraform-aws-components/modules -name README.md -type f -exec sed -r -i '' "s/${rs}/g" {} +
done
  • Ignore primary README and all deprecated content

why

  • Prettier is an opinionated code formatter. In particular, for markdown
  • Easily reversible: delete it later if we don't like it
  • Terraform Docs and Prettier would compete to format the same content. We want to ignore the content that is created by Terraform Docs

ref

@milldr milldr requested review from a team as code owners March 8, 2024 20:49
@milldr milldr added the no-release Do not create a new release (wait for additional code changes) label Mar 8, 2024
Copy link
Contributor

@dudymas dudymas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I honestly scanned a lot of this... but nothing seems out of place. Thanks

@milldr milldr merged commit 00304f4 into main Mar 11, 2024
@milldr milldr deleted the feat/prettier branch March 11, 2024 17:39
goruha pushed a commit to cloudposse-terraform-components/aws-account that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-account-map that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-account-quotas that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-account-settings that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-acm that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-amplify that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-api-gateway-account-settings that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-api-gateway-rest-api that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-athena that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-aurora-mysql that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-aurora-mysql-resources that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-aurora-postgres that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-aurora-postgres-resources that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-network-firewall that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-opsgenie-team that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-philips-labs-github-runners that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-rds that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-redshift that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-route53-resolver-dns-firewall that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-s3-bucket that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-security-hub that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-ses that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-sftp that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-snowflake-account that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-snowflake-database that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-sns-topic that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-spa-s3-cloudfront that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-spacelift-admin-stack that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-spacelift-spaces that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-spacelift-worker-pool-asg that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-sqs-queue that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-ssm-parameters that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-sso-saml-provider that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-strongdm that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-tfstate-backend that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-tgw-hub-connector that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-tgw-hub that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-tgw-spoke that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-vpc that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-vpc-flow-logs-bucket that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-vpc-peering that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-waf that referenced this pull request Nov 27, 2024
goruha pushed a commit to cloudposse-terraform-components/aws-zscaler that referenced this pull request Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-release Do not create a new release (wait for additional code changes)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants