-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathconfig.tf
67 lines (57 loc) · 1.67 KB
/
config.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
#########################################################A
### SECRETS
variable "aws_access_key" { type = string }
variable "aws_secret_key" { type = string }
variable "aws_key_pair_pub" { type = string }
variable "local_key_pair_priv" { type = string }
variable "db_master_password" { type = string }
variable "db_master_user" { type = string }
variable "dns_zone" { type = string }
### Define Secret valies in secrets.auto.tfvars (not included in git repo)
#########################################################A
variable "lab_name" { type = string }
variable "sg_name_websvr" { type = string }
variable "db_database" { type = string }
variable "db_name" { type = string }
variable "instance_ami" { type = string }
variable "instance_ami_name" { type = string }
variable "instance_name" { type = string }
provider "aws" {
access_key = var.aws_access_key
secret_key = var.aws_secret_key
region = "us-east-1"
version = "~> 3.6"
}
## Network definitions
variable "vpc_cidr" {
default = "192.168.0.0/16"
}
variable "vpc_networks" {
default = [
{
name = "Public-east-1a"
az = "us-east-1a"
public = true
cidr_network = "192.168.1.0/24"
has_db = false
},
{
name = "Private-east-1a"
az = "us-east-1a"
public = false
cidr_network = "192.168.2.0/24"
has_db = true
},
{
name = "Private-east-1b"
az = "us-east-1b"
public = false
cidr_network = "192.168.3.0/24"
has_db = true
}
]
}
# Name of the subnet that will hold the server
variable "server_subnet_cidr" {
default = "192.168.1.0/24"
}