123 lines
3.6 KiB
HCL
123 lines
3.6 KiB
HCL
###
|
|
# Standard Variables
|
|
#
|
|
# All modules expect these variables to be defined. Omitting them will result in errors or undefined/undesirable behavior.
|
|
#
|
|
# tflint-ignore: terraform_unused_declarations
|
|
variable "account" {
|
|
type = string
|
|
default = null
|
|
description = "Name of the account being used (master, nonprod, prod, etc)"
|
|
}
|
|
|
|
# tflint-ignore: terraform_unused_declarations
|
|
variable "attributes" {
|
|
type = list(string)
|
|
default = []
|
|
description = "Additional attributes (e.g. `1`)"
|
|
}
|
|
# tflint-ignore: terraform_unused_declarations
|
|
variable "cloud_provider" {
|
|
type = string
|
|
default = null
|
|
description = "Cloud provider name if any"
|
|
}
|
|
# tflint-ignore: terraform_unused_declarations
|
|
variable "context" {
|
|
type = object({
|
|
enabled = bool
|
|
namespace = string
|
|
cloud_provider = string
|
|
account = string
|
|
region = string
|
|
environment = string
|
|
stage = string
|
|
name = string
|
|
delimiter = string
|
|
attributes = list(string)
|
|
tags = map(string)
|
|
additional_tag_map = map(string)
|
|
regex_replace_chars = string
|
|
label_order = list(string)
|
|
id_length_limit = number
|
|
})
|
|
default = {
|
|
enabled = true
|
|
namespace = null
|
|
cloud_provider = null
|
|
account = null
|
|
region = null
|
|
environment = null
|
|
stage = null
|
|
name = null
|
|
delimiter = null
|
|
attributes = []
|
|
tags = {}
|
|
additional_tag_map = {}
|
|
regex_replace_chars = null
|
|
label_order = []
|
|
id_length_limit = null
|
|
}
|
|
description = <<-EOT
|
|
Single object for setting entire context at once.
|
|
See description of individual variables for details.
|
|
Leave string and numeric variables as `null` to use default value.
|
|
Individual variable settings (non-null) override settings in context object,
|
|
except for attributes, tags, and additional_tag_map, which are merged.
|
|
EOT
|
|
}
|
|
# tflint-ignore: terraform_unused_declarations
|
|
variable "domain" {
|
|
type = string
|
|
default = null
|
|
description = "TLD to use when deploying assets"
|
|
}
|
|
# tflint-ignore: terraform_unused_declarations
|
|
variable "enabled" {
|
|
type = bool
|
|
default = true
|
|
description = "Set to false to prevent the module from creating any resources"
|
|
}
|
|
# tflint-ignore: terraform_unused_declarations
|
|
variable "environment" {
|
|
type = string
|
|
default = null
|
|
description = "Environment, e.g. 'prod', 'staging', 'dev', 'pre-prod', 'UAT'"
|
|
}
|
|
|
|
variable "name" {
|
|
type = string
|
|
default = "hi"
|
|
description = "Module name, e.g. 'app' or 'jenkins'"
|
|
}
|
|
# tflint-ignore: terraform_unused_declarations
|
|
variable "namespace" {
|
|
type = string
|
|
default = null
|
|
description = "Namespace, which could be your organization name or abbreviation, e.g. 'eg' or 'cp'"
|
|
}
|
|
# tflint-ignore: terraform_unused_declarations
|
|
variable "region" {
|
|
type = string
|
|
default = null
|
|
description = "AWS region to deploy asset into"
|
|
}
|
|
# tflint-ignore: terraform_unused_declarations
|
|
variable "stage" {
|
|
type = string
|
|
default = null
|
|
description = "Stage, e.g. 'prod', 'staging', 'dev', OR 'source', 'build', 'test', 'deploy', 'release'"
|
|
}
|
|
# tflint-ignore: terraform_unused_declarations
|
|
variable "tags" {
|
|
type = map(string)
|
|
default = {}
|
|
description = "Additional tags (e.g. `map('BusinessUnit','XYZ')`"
|
|
}
|
|
|
|
###
|
|
# Module Variables
|
|
#
|
|
# Variables specific to this module
|
|
#
|