-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
outputs.tf
68 lines (59 loc) · 1.97 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
output "id" {
description = "The ID of the reachability analyzer path."
value = aws_ec2_network_insights_path.this.id
}
output "arn" {
description = "The ARN of the reachability analyzer path."
value = aws_ec2_network_insights_path.this.arn
}
output "name" {
description = "The name of the reachability analyzer path."
value = local.metadata.name
}
output "protocol" {
description = "The protocol to use for analysis."
value = upper(aws_ec2_network_insights_path.this.protocol)
}
output "source_network" {
description = "The configuration of source network for analysis."
value = {
id = aws_ec2_network_insights_path.this.source
ip_address = aws_ec2_network_insights_path.this.source_ip
}
}
output "destination_network" {
description = "The configuration of destination network for analysis."
value = {
id = aws_ec2_network_insights_path.this.destination
ip_address = aws_ec2_network_insights_path.this.destination_ip
port = aws_ec2_network_insights_path.this.destination_port
}
}
output "analyses" {
description = "A list of histories of the analysis with the reachability analyzer path."
value = [
for name, analysis in aws_ec2_network_insights_analysis.this : {
name = name
id = analysis.id
arn = analysis.arn
path_found = analysis.path_found
status = analysis.status
started_at = analysis.start_date
# INFO: https://docs.aws.amazon.com/vpc/latest/reachability/explanation-codes.html
explanation_codes = [
for explanation in analysis.explanations :
explanation.explanation_code
]
# status_message = analysis.status_message
# warning_message = analysis.warning_message
forward_path_components = [
for c in analysis.forward_path_components :
one(c.component)
]
return_path_components = [
for c in analysis.return_path_components :
one(c.component)
]
}
]
}