Skip to content

Commit

Permalink
add usage
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Mar 24, 2023
1 parent 171157c commit c228737
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
14 changes: 14 additions & 0 deletions cname/main.tf
Original file line number Diff line number Diff line change
@@ -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"
}
4 changes: 2 additions & 2 deletions common/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}
}

Expand All @@ -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."
}
}

Expand Down

0 comments on commit c228737

Please sign in to comment.