-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
79 lines (65 loc) · 2.12 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# Auxiliary variable for resource tags
variable "resource_tags" {
description = "Tags to set for all resources"
type = map(string)
default = {} ## Empty on purpose -- will be populated in a locals definition in main.tf
}
# General Variables
variable "aws_region" {
description = "The AWS region where Terraform deploys your instance"
type = string
default = "eu-west-1"
}
variable "aws_credentials_profile" {
description = "The profile used to connect to AWS - from .aws/credentials"
type = string
default = "tfadmin1"
}
# EC2 Instance related variables
variable "ec2_instance_type" {
type = string
description = "Instance type to use"
# default = "t2.micro"
}
variable "ec2_key_name" {
type = string
description = "Key to connect to instance with ssh"
}
## used only if bastion is deployed
variable "bastion_key_name" {
type = string
description = "Key to connect to bastion hosts with ssh"
}
## CIDR blocks from which to allow ssh and ping into instances (if used)
variable "cidr_allowed_external" {
description = "List of CIDR blocks that are considered whitelisted for ICMP and SSH access to bastion host"
type = list(string)
}
# Tagging and naming
variable "project_name" {
type = string
description = "project name - typically used as prefix to name some resources"
}
variable "project_env" {
type = string
description = "project environment - typically inserted as suffix in some resource names"
}
# VPC Variables
variable "public_subnets" {
type = list(string)
description = "list of subnets used in vpc module for public subnets"
default = ["10.0.101.0/24", "10.0.102.0/24"]
}
variable "private_subnets" {
type = list(string)
description = "list of subnets used in vpc module for private subnets"
default = ["10.0.1.0/24", "10.0.2.0/24"]
}
variable "database_subnets" {
type = list(string)
description = "list of subnets used in vpc module for database subnets"
default = ["10.0.201.0/24", "10.0.202.0/24"]
}
locals {
azs = ["${var.aws_region}a", "${var.aws_region}b"]
}