-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
40 lines (33 loc) · 961 Bytes
/
variables.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
variable "REGION" {
type = string
description = "Valid AWS region"
}
variable "CIDR_BLOCK" {
type = string
description = "VPC CIDR Block"
validation {
condition = can(regex("\\d{1,3}.\\d{1,3}.\\d{1,3}.\\d{1,3}/\\d{1,2}", var.CIDR_BLOCK))
error_message = "Pass valid IPV4 CIDR Block."
}
}
variable "PRIVATE_SUBNET_COUNT" {
type = number
description = "How many private subnets to create"
validation {
condition = var.PRIVATE_SUBNET_COUNT > 0
error_message = "At least one private subnet is required."
}
}
variable "PUBLIC_SUBNET_COUNT" {
type = number
description = "How many public subnets to create"
validation {
condition = var.PUBLIC_SUBNET_COUNT > 0
error_message = "At least one public subnet is required."
}
}
variable "AMI_ID" {
type = string
description = "NAT instance AMI-ID, if not passed creates NAT gateway instead."
default = ""
}