-
Notifications
You must be signed in to change notification settings - Fork 67
/
Copy pathoutputs.tf
90 lines (70 loc) · 2.76 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
# Copyright (c) 2019, 2020 Oracle Corporation and/or affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
output "vcn_id" {
description = "id of vcn that is created"
value = oci_core_vcn.vcn.id
}
output "nat_gateway_id" {
description = "id of nat gateway if it is created"
value = join(",", oci_core_nat_gateway.nat_gateway[*].id)
}
output "internet_gateway_id" {
description = "id of internet gateway if it is created"
value = join(",", oci_core_internet_gateway.ig[*].id)
}
output "service_gateway_id" {
description = "id of service gateway if it is created"
value = join(",", oci_core_service_gateway.service_gateway[*].id)
}
output "ig_route_id" {
description = "id of internet gateway route table"
value = join(",", oci_core_route_table.ig[*].id)
}
output "nat_route_id" {
description = "id of VCN NAT gateway route table"
value = join(",", oci_core_route_table.nat[*].id)
}
output "sgw_route_id" {
description = "id of VCN Service gateway route table"
value = join(",", oci_core_route_table.service_gw[*].id)
}
# New complete outputs for each resources with provider parity. Auto-updating.
# Usefull for module composition.
output "internet_gateway_all_attributes" {
description = "all attributes of created internet gateway"
value = { for k, v in oci_core_internet_gateway.ig : k => v }
}
output "ig_route_all_attributes" {
description = "all attributes of created ig route table"
value = { for k, v in oci_core_route_table.ig : k => v }
}
output "lpg_all_attributes" {
description = "all attributes of created lpg"
value = { for k, v in oci_core_local_peering_gateway.lpg : k => v }
}
output "nat_gateway_all_attributes" {
description = "all attributes of created nat gateway"
value = { for k, v in oci_core_nat_gateway.nat_gateway : k => v }
}
output "nat_route_all_attributes" {
description = "all attributes of created nat gateway route table"
value = { for k, v in oci_core_route_table.nat : k => v }
}
output "service_gateway_all_attributes" {
description = "all attributes of created service gateway"
value = { for k, v in oci_core_service_gateway.service_gateway : k => v }
}
output "vcn_all_attributes" {
description = "all attributes of created vcn"
value = { for k, v in oci_core_vcn.vcn : k => v }
}
# subnet
output "subnet_id" {
value = try(module.subnet[0].subnet_id, null)
}
output "subnet_all_attributes" {
value = try(module.subnet[0].all_attributes, null)
}
output "default_security_list_id" {
value = try(oci_core_vcn.vcn.default_security_list_id, null)
}