From c228737a9dfa5c3112e5e7c04034456720beb744 Mon Sep 17 00:00:00 2001 From: badra001 Date: Fri, 24 Mar 2023 10:21:50 -0400 Subject: [PATCH] add usage --- .pre-commit-config.yaml | 6 +++--- cname/main.tf | 14 ++++++++++++++ common/variables.tf | 4 ++-- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 93cda0b..fa6d366 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,9 +9,9 @@ repos: exclude: common/*.tf exclude: version.tf exclude: examples/ - - id: terraform_tflint - args: [ "--args=--config=__GIT_WORKING_DIR__/.tflint.hcl"] - exclude: examples/ +# - id: terraform_tflint +# args: [ "--args=--config=__GIT_WORKING_DIR__/.tflint.hcl"] +# exclude: examples/ - repo: https://github.com/pre-commit/pre-commit-hooks rev: v3.4.0 hooks: diff --git a/cname/main.tf b/cname/main.tf index 5e3cd56..02ba4e8 100644 --- a/cname/main.tf +++ b/cname/main.tf @@ -1,3 +1,17 @@ +/* aws-dns :: cname +* # About +* # Usage +* +* ```hcl +* module "lakefront_cname" { +* source = "git@github.e.it.census.gov:terraform-modules/aws-dns//cname" +* +* name = format("%v.%v", local.app_shortname, var.vpc_domain_name) +* values = [format("%v.execute-api.%v.amazonaws.com", data.aws_api_gateway_rest_api.lakefront.id, local.region)] +* } +* ``` +*/ + locals { record_type = "cname" } diff --git a/common/variables.tf b/common/variables.tf index 7a012a6..0c83c5d 100644 --- a/common/variables.tf +++ b/common/variables.tf @@ -10,7 +10,7 @@ variable "name" { validation { condition = length(split(".", var.name)) > 1 - error_message = "Invalid name, must use FQDN with a hostname and domain name" + error_message = "Invalid name, must use FQDN with a hostname and domain name." } } @@ -21,7 +21,7 @@ variable "record_type" { validation { condition = contains(["cname", "a", "aaaa", "ptr", "txt", "host"], var.record_type) - error_message = "The record type must be one of: cname, a, aaaa, ptr, txt, or host" + error_message = "The record type must be one of: cname, a, aaaa, ptr, txt, or host." } }