@@ -152,7 +152,7 @@ def convert_graph_to_modulestf_config(graph): # noqa: C901
152
152
if sg_id :
153
153
r .append_dependency (sg_id )
154
154
r .update_dynamic_params ("vpc_security_group_ids" ,
155
- "[dependency." + sg_id + ".outputs.this_security_group_id ]" )
155
+ "[dependency." + sg_id + ".outputs.security_group_id ]" )
156
156
r .update_params ({"create_security_group" : False })
157
157
158
158
if node .get ("engine" ) == "aurora-mysql" :
@@ -195,6 +195,7 @@ def convert_graph_to_modulestf_config(graph): # noqa: C901
195
195
"family" : "" ,
196
196
"backup_retention_period" : "0" , # Disable backups to create DB faster
197
197
"vpc_security_group_ids" : [],
198
+ "create_db_subnet_group" : False ,
198
199
})
199
200
200
201
if vpc_id :
@@ -205,15 +206,15 @@ def convert_graph_to_modulestf_config(graph): # noqa: C901
205
206
if sg_id :
206
207
r .append_dependency (sg_id )
207
208
r .update_dynamic_params ("vpc_security_group_ids" ,
208
- "[dependency." + sg_id + ".outputs.this_security_group_id ]" )
209
+ "[dependency." + sg_id + ".outputs.security_group_id ]" )
209
210
210
211
if node .get ("engine" ) == "mysql" :
211
212
r .update_params ({
212
213
"engine" : "mysql" ,
213
214
"port" : "3306" ,
214
- "engine_version" : "5.7.19 " ,
215
- "major_engine_version" : "5.7 " ,
216
- "family" : "mysql5.7 " ,
215
+ "engine_version" : "8.0.20 " ,
216
+ "major_engine_version" : "8.0 " ,
217
+ "family" : "mysql8.0 " ,
217
218
})
218
219
elif node .get ("engine" ) == "mariadb" :
219
220
r .update_params ({
@@ -225,11 +226,11 @@ def convert_graph_to_modulestf_config(graph): # noqa: C901
225
226
})
226
227
elif node .get ("engine" ) == "postgres" :
227
228
r .update_params ({
228
- "engine" : "mariadb " ,
229
+ "engine" : "postgres " ,
229
230
"port" : "5432" ,
230
- "engine_version" : "9.6.9 " ,
231
- "major_engine_version" : "9.6 " ,
232
- "family" : "postgres9.6 " ,
231
+ "engine_version" : "11.10 " ,
232
+ "major_engine_version" : "11 " ,
233
+ "family" : "postgres11 " ,
233
234
})
234
235
else :
235
236
r .update_params ({
@@ -272,6 +273,8 @@ def convert_graph_to_modulestf_config(graph): # noqa: C901
272
273
"max_size" : 1 ,
273
274
"desired_capacity" : 1 ,
274
275
"health_check_type" : "EC2" ,
276
+ "use_lt" : True ,
277
+ "create_lt" : True ,
275
278
"image_id" : "HCL:dependency.aws-data.outputs.amazon_linux2_aws_ami_id" ,
276
279
"vpc_zone_identifier" : [],
277
280
"security_groups" : [],
@@ -285,7 +288,7 @@ def convert_graph_to_modulestf_config(graph): # noqa: C901
285
288
286
289
if sg_id :
287
290
r .append_dependency (sg_id )
288
- r .update_dynamic_params ("security_groups" , "[dependency." + sg_id + ".outputs.this_security_group_id ]" )
291
+ r .update_dynamic_params ("security_groups" , "[dependency." + sg_id + ".outputs.security_group_id ]" )
289
292
290
293
if elb_id and elb_type == "application" :
291
294
r .update_params ({
@@ -340,7 +343,7 @@ def convert_graph_to_modulestf_config(graph): # noqa: C901
340
343
341
344
if sg_id :
342
345
r .append_dependency (sg_id )
343
- r .update_dynamic_params ("security_groups" , "[dependency." + sg_id + ".outputs.this_security_group_id ]" )
346
+ r .update_dynamic_params ("security_groups" , "[dependency." + sg_id + ".outputs.security_group_id ]" )
344
347
345
348
elif node .get ("elbType" ) == "network" :
346
349
r = Resource (key , "nlb" , node_text )
@@ -380,7 +383,7 @@ def convert_graph_to_modulestf_config(graph): # noqa: C901
380
383
381
384
if sg_id :
382
385
r .append_dependency (sg_id )
383
- r .update_dynamic_params ("security_groups" , "[dependency." + sg_id + ".outputs.this_security_group_id ]" )
386
+ r .update_dynamic_params ("security_groups" , "[dependency." + sg_id + ".outputs.security_group_id ]" )
384
387
385
388
resources .append (r .content ())
386
389
@@ -407,7 +410,7 @@ def convert_graph_to_modulestf_config(graph): # noqa: C901
407
410
408
411
if sg_id :
409
412
r .append_dependency (sg_id )
410
- r .update_dynamic_params ("vpc_security_group_ids" , "[dependency." + sg_id + ".outputs.this_security_group_id ]" )
413
+ r .update_dynamic_params ("vpc_security_group_ids" , "[dependency." + sg_id + ".outputs.security_group_id ]" )
411
414
412
415
resources .append (r .content ())
413
416
@@ -525,7 +528,7 @@ def convert_graph_to_modulestf_config(graph): # noqa: C901
525
528
rules_with_cidr_blocks .append (tmp_rule )
526
529
else :
527
530
dependency_sg_id = rule .get ("target" )
528
- tmp_rule .update ({"source_security_group_id" : "HCL:dependency." + dependency_sg_id + ".outputs.this_security_group_id " })
531
+ tmp_rule .update ({"source_security_group_id" : "HCL:dependency." + dependency_sg_id + ".outputs.security_group_id " })
529
532
rules_with_source_security_group_id .append (tmp_rule )
530
533
531
534
r .append_dependency (dependency_sg_id )
@@ -570,7 +573,6 @@ def convert_graph_to_modulestf_config(graph): # noqa: C901
570
573
"database_subnets" :
571
574
"HCL:[for k,v in dependency.aws-data.outputs.available_aws_availability_zones_names: cidrsubnet(\" " +
572
575
selected_vpc_cidr + "\" , 8, k+20)]" ,
573
- # "redshift_subnets": [],
574
576
})
575
577
576
578
r .append_dependency ("aws-data" )
0 commit comments