forked from aws-ia/terraform-aws-rds-aurora
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoutputs.tf
107 lines (87 loc) · 3.49 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
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
# aws_rds_cluster
output "primary_aurora_cluster_arn" {
description = "The ARN of the Primary Aurora cluster"
value = aws_rds_cluster.primary.arn
}
output "secondary_aurora_cluster_arn" {
description = "The ARN of the Secondary Aurora cluster"
value = one(aws_rds_cluster.secondary[*].arn)
}
output "primary_aurora_cluster_id" {
description = "The ID of the Primary Aurora cluster"
value = aws_rds_cluster.primary.id
}
output "secondary_aurora_cluster_id" {
description = "The ID of the Secondary Aurora cluster"
value = one(aws_rds_cluster.secondary[*].id)
}
output "primary_aurora_cluster_resource_id" {
description = "The Cluster Resource ID of the Primary Aurora cluster"
value = aws_rds_cluster.primary.cluster_resource_id
}
output "secondary_aurora_cluster_resource_id" {
description = "The Cluster Resource ID of the Secondary Aurora cluster"
value = one(aws_rds_cluster.secondary[*].cluster_resource_id)
}
output "primary_aurora_cluster_endpoint" {
description = "Primary Aurora cluster endpoint"
value = aws_rds_cluster.primary.endpoint
}
output "secondary_aurora_cluster_endpoint" {
description = "Secondary Aurora cluster endpoint"
value = one(aws_rds_cluster.secondary[*].endpoint)
}
output "primary_aurora_cluster_reader_endpoint" {
description = "Primary Aurora cluster reader endpoint"
value = aws_rds_cluster.primary.reader_endpoint
}
output "secondary_aurora_cluster_reader_endpoint" {
description = "Secondary Aurora cluster reader endpoint"
value = one(aws_rds_cluster.secondary[*].reader_endpoint)
}
output "primary_aurora_cluster_port" {
description = "Primary Aurora cluster endpoint port"
value = aws_rds_cluster.primary.port
}
output "secondary_aurora_cluster_port" {
description = "Secondary Aurora cluster endpoint port"
value = one(aws_rds_cluster.secondary[*].port)
}
output "aurora_cluster_database_name" {
description = "Name for an automatically created database on Aurora cluster creation"
value = var.database_name
}
output "aurora_cluster_master_username" {
description = "Aurora master username"
value = aws_rds_cluster.primary.master_username
}
output "aurora_cluster_master_password" {
description = "Aurora master User password"
value = try(aws_rds_cluster.primary.master_password, null)
sensitive = true
}
output "primary_aurora_cluster_hosted_zone_id" {
description = "Route53 hosted zone id of the Primary Aurora cluster"
value = aws_rds_cluster.primary.hosted_zone_id
}
output "secondary_aurora_cluster_hosted_zone_id" {
description = "Route53 hosted zone id of the Secondary Aurora cluster"
value = one(aws_rds_cluster.secondary[*].hosted_zone_id)
}
# aws_rds_cluster_instance
output "primary_aurora_cluster_instance_endpoints" {
description = "A list of all Primary Aurora cluster instance endpoints"
value = aws_rds_cluster_instance.primary[*].endpoint
}
output "secondary_aurora_cluster_instance_endpoints" {
description = "A list of all Secondary Aurora cluster instance endpoints"
value = try(aws_rds_cluster_instance.secondary[*].endpoint, null)
}
output "primary_aurora_cluster_instance_ids" {
description = "A list of all Primary Aurora cluster instance ids"
value = aws_rds_cluster_instance.primary[*].id
}
output "secondary_aurora_cluster_instance_ids" {
description = "A list of all Secondary Aurora cluster instance ids"
value = try(aws_rds_cluster_instance.secondary[*].id, null)
}