@@ -46,27 +46,30 @@ data "template_cloudinit_config" "bastion-config" {
46
46
data "template_file" "bootstrap" {
47
47
template = file (" ${ path . module } /userdata/odi-bootstrap.tpl" )
48
48
vars = {
49
- odi_vnc_password = var.odi_vnc_password
50
- adw_instance = lookup (module. adw . adw ,var. adw_db_name )
51
- adw_username = var.adw_username
52
- adw_password = var.adw_password
53
- odi_password = var.odi_password
54
- odi_schema_prefix = var.odi_schema_prefix
55
- odi_schema_password = var.odi_schema_password
56
- adw_creation_mode = var.adw_creation_mode
57
- embedded_db = var.embedded_db
58
- studio_mode = var.studio_mode
59
- db_tech = var.db_tech
60
- studio_name = var.studio_name
49
+ odi_vnc_password = var.odi_vnc_password
50
+ adw_instance = lookup (module. adw . adw ,var. adw_db_name )
51
+ adw_username = var.adw_username
52
+ adw_password = var.adw_password
53
+ odi_password = var.odi_password
54
+ odi_schema_prefix = var.odi_schema_prefix
55
+ odi_schema_password = var.odi_schema_password
56
+ adw_creation_mode = var.adw_creation_mode
57
+ embedded_db = var.embedded_db
58
+ studio_mode = var.studio_mode
59
+ db_tech = var.db_tech
60
+ lb_address = " "
61
+ register_repository = false
62
+ show_adp_desktop = false
63
+ studio_name = var.studio_name
61
64
}
62
65
}
63
66
64
67
65
68
locals {
66
- odi_image = " ocid1.image.oc1..aaaaaaaa6khjykwya7brreppxvtiuifnolxmmgufcfbtwvugtui5kjjzz4sa "
67
- mp_listing_id = " ocid1.appcataloglisting.oc1..aaaaaaaat7fdtoicx5x34ofrcckfoimlrjb4tly5pgm3qfoyqssp2qnvsl6q"
68
- mp_listing_resource_id = " ocid1.image.oc1..aaaaaaaa6khjykwya7brreppxvtiuifnolxmmgufcfbtwvugtui5kjjzz4sa "
69
- mp_listing_resource_version = " ODI_Marketplace_V12 .2.1.4.200721a "
69
+ odi_image = " ocid1.image.oc1..aaaaaaaagufmbd5nvlq5cdhhhg5rikrtiljj2ppufxllx3m4v363x3k4eucq "
70
+ mp_listing_id = " ocid1.appcataloglisting.oc1..aaaaaaaat7fdtoicx5x34ofrcckfoimlrjb4tly5pgm3qfoyqssp2qnvsl6q"
71
+ mp_listing_resource_id = " ocid1.image.oc1..aaaaaaaagufmbd5nvlq5cdhhhg5rikrtiljj2ppufxllx3m4v363x3k4eucq "
72
+ mp_listing_resource_version = " Oracle_Data_Integrator_V12 .2.1.4.221007 "
70
73
71
74
ad_names = compact (data. template_file . ad_names . * . rendered )
72
75
public_subnet_availability_domain = local. ad_names [0 ]
@@ -137,7 +140,7 @@ bastion_instance_params = {
137
140
assign_public_ip = true
138
141
hostname_label = " "
139
142
source_type = " image"
140
- source_id = var.bation_linux_image
143
+ source_id = var.bastion_instance_image_ocid[var.region]
141
144
metadata = {
142
145
ssh_authorized_keys = module.keygen.OPCPrivateKey.public_key_openssh
143
146
user_data = data.template_cloudinit_config.bastion- config.rendered
@@ -157,9 +160,9 @@ bastion_instance_params = {
157
160
shape = var.odi_instance_shape
158
161
defined_tags = { " ${ oci_identity_tag_namespace . ArchitectureCenterTagNamespace . name } .${ oci_identity_tag . ArchitectureCenterTag . name } " = var.release }
159
162
freeform_tags = {}
160
- subnet_id = lookup (module. network-subnets . subnets ," public -subnet" ).id
163
+ subnet_id = lookup (module. network-subnets . subnets ," private -subnet" ).id
161
164
vnic_display_name = " "
162
- assign_public_ip = true
165
+ assign_public_ip = false
163
166
hostname_label = " "
164
167
source_type = " image"
165
168
source_id = local.odi_image
@@ -257,8 +260,34 @@ bastion_instance_params = {
257
260
}],
258
261
defined_tags = { " ${ oci_identity_tag_namespace . ArchitectureCenterTagNamespace . name } .${ oci_identity_tag . ArchitectureCenterTag . name } " = var.release }
259
262
}
263
+ private_route_table-nat = {
264
+ compartment_id = var.compartment_id,
265
+ vcn_id= lookup (module. network-vcn . vcns ," vcn" ).id,
266
+ subnet_id = lookup (module. network-subnets . subnets ," private-subnet" ).id,
267
+ route_table_id = " " ,
268
+ route_rules = [{
269
+ is_create = true ,
270
+ destination = " 0.0.0.0/0" ,
271
+ destination_type = " CIDR_BLOCK" ,
272
+ network_entity_id = lookup (module. network-vcn . nat_gateways , lookup (module. network-vcn . vcns ," vcn" ). id ).id,
273
+ description = " "
274
+ }],
275
+ defined_tags = {}
276
+ }
260
277
}
261
278
279
+ # network routing attachment
280
+ network-routing-attachment = {
281
+ " " = {
282
+ compartment_id = var.compartment_id,
283
+ vcn_id = lookup (module. network-vcn . vcns ," vcn" ).id,
284
+ subnet_id = lookup (module. network-subnets . subnets ," public-subnet" ).id,
285
+ route_table_id = lookup (module. network-routing . subnets_route_tables ," public_route_table" ).id,
286
+ route_rules = [],
287
+ defined_tags = {}
288
+ }
289
+ }
290
+
262
291
# create security list - opening port 22 ssh and port 80 - http
263
292
security_lists = {
264
293
public_security_list = {
@@ -370,6 +399,16 @@ bastion_instance_params = {
370
399
icmp_type = null ,
371
400
icmp_code = null
372
401
}],
402
+ [{
403
+ stateless = false
404
+ protocol = " all"
405
+ src = " 0.0.0.0/0" ,
406
+ src_type = " CIDR_BLOCK" ,
407
+ src_port = null ,
408
+ dst_port = null
409
+ icmp_type = null ,
410
+ icmp_code = null
411
+ }],
373
412
[{
374
413
stateless = false
375
414
protocol = " 17"
0 commit comments