-
Notifications
You must be signed in to change notification settings - Fork 1
/
_General.tf
executable file
·47 lines (43 loc) · 1.32 KB
/
_General.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
## Provider
terraform {
required_version = ">= 0.13"
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 3.5"
}
null = {
source = "hashicorp/null"
version = "~> 2.1"
}
}
}
## Data
# AWS
data "aws_region" "current" {}
## Variables
# Naming
variable "Project_Prefix" {
type = string
default = "demo"
description = "The prefix before all project created resources, including Transit Gateways, attachments and routing tables."
}
# HA/AZ Targetting
variable "AZ1" {
type = string
default = "a"
description = "The Availability Zone character (e.g. eu-west-1a = a or eu-west-1b = b) for all assets targetting this AZ (one of each of the subnets, one for each of the firewalls, etc.)"
validation {
condition = can(regex("^[a-z]$", var.AZ1))
error_message = "Availability Zones are indicated by a single, lower case, letter."
}
}
variable "AZ2" {
type = string
default = "b"
description = "The Availability Zone character (e.g. eu-west-1a = a or eu-west-1b = b) for all assets targetting this AZ (one of each of the subnets, one for each of the firewalls, etc.)"
validation {
condition = can(regex("^[a-z]$", var.AZ2))
error_message = "Availability Zones are indicated by a single, lower case, letter."
}
}