-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathinterface.tf
122 lines (98 loc) · 2.4 KB
/
interface.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
variable "region" {
type = string
description = "The AWS region."
}
variable "environment" {
type = string
description = "The name of our environment, i.e. development."
default = "development"
}
variable "key_name" {
type = string
description = "The AWS key pair to use for resources."
default = "development"
}
variable "vpc_cidr" {
type = string
description = "The CIDR of the VPC."
}
variable "public_subnets" {
type = list(string)
default = []
description = "The list of public subnets to populate."
}
variable "private_subnets" {
type = list(string)
default = []
description = "The list of private subnets to populate."
}
variable "ami" {
type = map(string)
default = {
"us-east-1" = "ami-f652979b"
"us-west-1" = "ami-7c4b331c"
"eu-west-1" = "ami-0ae77879"
}
description = "The AMIs to use for web and app instances."
}
variable "instance_type" {
type = string
default = "t2.micro"
description = "The instance type to launch "
}
variable "bastion_instance_type" {
type = string
default = "t2.micro"
description = "The bastion host instance type."
}
variable "bastion_ami" {
type = map(string)
default = {
"us-east-1" = "ami-f652979b"
"us-west-1" = "ami-7c4b331c"
"eu-west-1" = "ami-0ae77879"
}
description = "The bastion host AMIs."
}
variable "enable_dns_hostnames" {
type = bool
description = "Should be true if you want to use private DNS within the VPC"
default = true
}
variable "enable_dns_support" {
type = bool
description = "Should be true if you want to use private DNS within the VPC"
default = true
}
variable "map_public_ip_on_launch" {
type = bool
description = "Should be false if you do not want to auto-assign public IP on launch"
default = true
}
output "vpc_id" {
value = aws_vpc.environment.id
}
output "vpc_cidr" {
value = aws_vpc.environment.cidr_block
}
output "bastion_host_dns" {
value = aws_instance.bastion.public_dns
}
output "bastion_host_ip" {
value = aws_instance.bastion.public_ip
}
output "public_subnet_ids" {
value = aws_subnet.public[*].id
}
output "private_subnet_ids" {
value = aws_subnet.private[*].id
}
output "public_route_table_id" {
value = aws_route_table.public.id
}
output "private_route_table_id" {
value = aws_route_table.private[*].id
}
output "default_security_group_id" {
value = aws_vpc.environment.default_security_group_id
}