This repository was archived by the owner on Apr 18, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +23
-5
lines changed Expand file tree Collapse file tree 3 files changed +23
-5
lines changed Original file line number Diff line number Diff line change 1
1
output "vcn-id" {
2
- value = " ${ oci_core_vcn . cloudera_vcn . 0 . id } "
2
+ value = " ${ var . useExistingVcn ? var . myVcn : oci_core_vcn . cloudera_vcn . 0 . id } "
3
3
}
4
4
5
5
output "private-id" {
6
- value = " ${ oci_core_subnet . private . 0 . id } "
6
+ value = " ${ var . useExistingVcn ? var . clusterSubnet : oci_core_subnet . private . 0 . id } "
7
7
}
8
8
9
9
output "public-id" {
10
- value = " ${ oci_core_subnet . public . 0 . id } "
10
+ value = " ${ var . useExistingVcn ? var . utilitySubnet : oci_core_subnet . public . 0 . id } "
11
11
}
12
12
13
13
output "bastion-id" {
14
- value = " ${ oci_core_subnet . bastion . 0 . id } "
14
+ value = " ${ var . useExistingVcn ? var . bastionSubnet : oci_core_subnet . bastion . 0 . id } "
15
15
}
16
16
17
17
output "blockvolume-id" {
18
- value = " ${ oci_core_subnet . blockvolume . 0 . id } "
18
+ value = " ${ var . useExistingVcn ? var . blockvolumeSubnet : oci_core_subnet . blockvolume . 0 . id } "
19
19
}
Original file line number Diff line number Diff line change @@ -25,6 +25,19 @@ variable "public_cidr" {}
25
25
variable "private_cidr" {}
26
26
variable "blockvolume_cidr" {}
27
27
variable "enable_secondary_vnic" {}
28
+ variable "myVcn" {}
29
+ variable "clusterSubnet" {
30
+ default = " "
31
+ }
32
+ variable "bastionSubnet" {
33
+ default = " "
34
+ }
35
+ variable "utilitySubnet" {
36
+ default = " "
37
+ }
38
+ variable "blockvolumeSubnet" {
39
+ default = " "
40
+ }
28
41
# ---------------------------------------------------------------------------------------------------------------------
29
42
# Optional variables
30
43
# You can modify these.
Original file line number Diff line number Diff line change @@ -28,4 +28,9 @@ module "network" {
28
28
blockvolume_cidr = " ${ var . blockvolume_cidr } "
29
29
custom_vcn = [" ${ var . myVcn } " ]
30
30
enable_secondary_vnic = " ${ var . enable_secondary_vnic } "
31
+ clusterSubnet = " ${ var . clusterSubnet } "
32
+ bastionSubnet = " ${ var . bastionSubnet } "
33
+ utilitySubnet = " ${ var . utilitySubnet } "
34
+ blockvolumeSubnet = " ${ var . blockvolumeSubnet } "
35
+ myVcn = " ${ var . myVcn } "
31
36
}
You can’t perform that action at this time.
0 commit comments