forked from dioxic/terraform-aws-mongodb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoutputs.tf
executable file
·70 lines (55 loc) · 1.14 KB
/
outputs.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
output "vpc_id" {
value = var.vpc_id
}
output "mongodb_security_group_id" {
value = local.security_group_id
}
output "mongodb_public_ip" {
value = values(aws_instance.mongodb)[*].public_ip
}
output "mongodb_private_ip" {
value = values(aws_instance.mongodb)[*].private_ip
}
output "mongodb_hostnames" {
value = values(local.nodes)[*].fqdn
}
output "nodes" {
value = local.nodes
}
output "replica_sets" {
value = local.replica_sets
}
output "mongo_uri" {
value = coalesce(local.mongo_cluster_uri, local.mongo_rs_uri[0])
}
output "mongo_rs_uri" {
value = local.mongo_rs_uri
}
output "user_data" {
value = local.user_data
}
output "mongod_conf" {
value = local.mongod_conf
}
output "mongos_conf" {
value = local.mongos_conf
}
output "domain_name" {
value = var.domain_name
}
output "sharded" {
value = local.sharded
}
output "security_group_ingress_rules" {
value = concat(
local.ssh_ingress_self,
local.ssh_ingress_cidr,
local.ssh_ingress_sg,
local.mongo_ingress_self,
local.mongo_ingress_cidr,
local.mongo_ingress_sg
)
}
output "cloudinit_config" {
value = data.template_cloudinit_config.mongodb
}