-
Notifications
You must be signed in to change notification settings - Fork 6
/
interface.tf
74 lines (59 loc) · 1.38 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
variable "region" {
type = string
description = "The AWS region."
}
variable "environment" {
type = string
description = "The name of our environment, i.e. development."
}
variable "key_name" {
type = string
description = "The AWS key pair to use for resources."
}
variable "private_key_path" {
type = string
description = "The path to the private ssh key"
}
variable "ami" {
type = map(string)
default = {
"us-east-1" = "ami-f652979b"
"us-west-1" = "ami-7c4b331c"
}
description = "The AMIs to use for consul instances."
}
variable "instance_type" {
type = string
default = "t2.micro"
description = "The instance type to launch "
}
variable "vpc_id" {
type = string
description = "The VPC ID to launch in"
}
variable "public_subnet_id" {
type = string
description = "The public subnet ID available to launch in"
}
variable "servers" {
type = number
description = "Number of servers in the Consul cluster"
default = "3"
}
variable "token" {
type = string
description = "Consul ACL master token"
}
variable "encryption_key" {
type = string
description = "Consul cluster encryption key"
}
output "consul_dns_addresses" {
value = aws_instance.server[*].public_dns
}
output "consul_host_addresses" {
value = aws_instance.server[*].private_ip
}
output "consul_datacenter" {
value = data.template_file.master.vars.environment
}