Files
module-Azure-Virtual-Network/variables.tf
Josuani Moranchel 7b032ed33c modulo
2024-02-15 14:19:57 -06:00

178 lines
5.2 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
#
variable "virtual_network" {
type = string
default = "network"
}
locals {
virtual_network = "${var.name}_${var.virtual_network}"
}
variable "address_space" {
type = list(string)
default = ["10.0.0.0/16"]
description = "El espacio de direcciones que se usa en la red virtual. Puede proporcionar más de un espacio de direcciones."
}
variable "dns_servers" {
type = list(string)
default = ["10.0.0.4", "10.0.0.5"]
description = "Lista de direcciones IP de servidores DNS"
}
variable "bgp_community" {
type = number
description = " El atributo de comunidad BGP en formato <as-number>:<community-value>."
}
variable "edge_zone" {
type = string
description = " Especifica la zona perimetral dentro de la región de Azure en la que debe existir esta red virtual. Cambiar esto obliga a crear una nueva red virtual."
}
variable "flow_timeout_in_minutes" {
type = number
description = "El tiempo de espera del flujo en minutos para la red virtual, que se usa para habilitar el seguimiento de conexiones para los flujos dentro de la máquina virtual. Los valores posibles están entre 4 y 30 minutos"
}
variable "ddos_protection_plan" {
type = map(object({
id = string #id de la configuración de un plan de protección contra ataques de denegación de servicio distribuido
enable = bool #se define si esta activado o no
}))
description = "configuración de un plan de protección contra ataques de denegación de servicio distribuido "
}
variable "subnets" {
type = map(object({
name = string
address_space = string
resource_group_name = string
security_group = string
}))
}