@@ -32,7 +32,7 @@ variable "internet_gateway" {
32
32
# outputs
33
33
34
34
output "vcn" {
35
- value = oci_core_vcn. this . id
35
+ value = data . oci_core_vcn . this . id
36
36
description = " ocid of created vcn"
37
37
}
38
38
@@ -41,12 +41,12 @@ output "cidrs" {
41
41
}
42
42
43
43
output "service_gateway" {
44
- value = var. service_gateway ? data. oci_core_service_gateway . this [0 ]. id : null
44
+ value = var. service_gateway ? data. oci_core_service_gateways . this [0 ]. id : null
45
45
description = " ocid of created SGW"
46
46
}
47
47
48
48
output "service_cidr" {
49
- value = var. service_gateway ? data. oci_core_services . all_oci_services [0 ]. services [0 ]. cidr_block : null
49
+ value = var. service_gateway ? data. oci_core_services . this [0 ]. services [0 ]. cidr_block : null
50
50
description = " the service cidr used by the service gateway"
51
51
}
52
52
@@ -65,14 +65,14 @@ output "internet_gateway" {
65
65
66
66
67
67
data "oci_core_vcn" "this" {
68
- vcn_id = var. vcn
68
+ vcn_id = var. vcn_id
69
69
}
70
70
71
71
data "oci_core_service_gateways" "this" {
72
72
count = var. service_gateway ? 1 : 0
73
73
74
74
compartment_id = data. oci_core_vcn . this . compartment_id
75
- vcn_id = var. vcn
75
+ vcn_id = var. vcn_id
76
76
}
77
77
# service gateway does not contain name of service cidr block, so we need to extract from services datasource
78
78
data "oci_core_services" "this" {
@@ -90,14 +90,14 @@ data "oci_core_nat_gateways" "this" {
90
90
count = var. nat_gateway ? 1 : 0
91
91
92
92
compartment_id = data. oci_core_vcn . this . compartment_id
93
- vcn_id = var. vcn
93
+ vcn_id = var. vcn_id
94
94
}
95
95
96
96
data "oci_core_internet_gateways" "this" {
97
97
count = var. internet_gateway ? 1 : 0
98
98
99
99
compartment_id = data. oci_core_vcn . this . compartment_id
100
- vcn_id = var. vcn
100
+ vcn_id = var. vcn_id
101
101
}
102
102
103
103
0 commit comments