From 0d90dc6db980e5b7c54c8e220ac0133e84003acd Mon Sep 17 00:00:00 2001 From: Matt White <16320656+matt-FFFFFF@users.noreply.github.com> Date: Fri, 10 Nov 2023 14:16:16 +0100 Subject: [PATCH] fix: custom lz regex #855 (#857) --- .tfdocs-config.yml => .terraform-docs.yml | 4 ++-- Makefile | 5 ++++- variables.tf | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) rename .tfdocs-config.yml => .terraform-docs.yml (91%) diff --git a/.tfdocs-config.yml b/.terraform-docs.yml similarity index 91% rename from .tfdocs-config.yml rename to .terraform-docs.yml index b65e6731f..f3be6195b 100644 --- a/.tfdocs-config.yml +++ b/.terraform-docs.yml @@ -1,6 +1,6 @@ ### To generate the output file to partially incorporate in the README.md, ### Execute this command in the Terraform module's code folder: -# terraform-docs -c .tfdocs-config.yml . +# terraform-docs -c .terraform-docs.yml . formatter: "markdown document" # this is required @@ -18,7 +18,7 @@ sections: show: [] hide-all: false # deprecated in v0.13.0, removed in v0.15.0 - show-all: true # deprecated in v0.13.0, removed in v0.15.0 + show-all: true # deprecated in v0.13.0, removed in v0.15.0 content: |- {{ .Header }} diff --git a/Makefile b/Makefile index 6a05c4bb0..adcfb77f3 100644 --- a/Makefile +++ b/Makefile @@ -72,4 +72,7 @@ opa-update-git: @echo "==> Running script..." ./tests/scripts/opa-update-git.sh -.PHONY: azp-strategy azp-backend azp-spn-generator tf-install tf-prepare tf-fmt tf-init tf-plan tf-apply tf-destroy terratest opa-install opa-run-tests opa-update-values opa-update-git +docs: + terraform-docs . + +.PHONY: azp-strategy azp-backend azp-spn-generator docs tf-install tf-prepare tf-fmt tf-init tf-plan tf-apply tf-destroy terratest opa-install opa-run-tests opa-update-values opa-update-git diff --git a/variables.tf b/variables.tf index bc1b1bb3c..a406169c0 100644 --- a/variables.tf +++ b/variables.tf @@ -603,8 +603,8 @@ DESCRIPTION default = {} validation { - condition = can([for k in keys(var.custom_landing_zones) : regex("^[a-zA-Z0-9-]{2,89}$", k)]) || length(keys(var.custom_landing_zones)) == 0 - error_message = "The custom_landing_zones keys must be between 2 to 89 characters long and can only contain lowercase letters, numbers and hyphens." + condition = can([for k in keys(var.custom_landing_zones) : regex("^[a-zA-Z0-9-.]{2,89}$", k)]) || length(keys(var.custom_landing_zones)) == 0 + error_message = "The custom_landing_zones keys must be between 2 to 89 characters long and can only contain lowercase letters, numbers, periods, and hyphens." } }