-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathterraform.tf
More file actions
52 lines (49 loc) · 1.25 KB
/
terraform.tf
File metadata and controls
52 lines (49 loc) · 1.25 KB
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
terraform {
required_version = ">= 0.12"
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5.98.0"
}
random = {
source = "hashicorp/random"
version = ">= 2"
}
tls = {
source = "hashicorp/tls"
version = "4.0.5"
}
consul = {
source = "hashicorp/consul"
version = "2.21.0"
}
nomad = {
source = "hashicorp/nomad"
version = "2.5.0"
}
}
}
provider "aws" { }
provider "consul" {
datacenter = var.datacenter
#address = "${aws_instance.server[0].public_ip}:8443"
address = "${aws_eip.nomad_consul.public_ip}:8443"
token = random_uuid.consul_mgmt_token.result
ca_pem = tls_self_signed_cert.datacenter_ca.cert_pem
scheme = "https"
insecure_https = true
}
provider "nomad" {
#address = "https://${aws_instance.server[0].public_ip}:4646"
address = "https://${aws_eip.nomad_consul.public_ip}:4646"
region = var.domain
secret_id = random_uuid.nomad_mgmt_token.result
ca_pem = tls_self_signed_cert.datacenter_ca.cert_pem
skip_verify = true
ignore_env_vars = {
"NOMAD_ADDR" : true,
"NOMAD_TOKEN" : true,
"NOMAD_CACERT" : true,
"NOMAD_TLS_SERVER_NAME" : true,
}
}