@@ -60,6 +60,7 @@ def convert(
6060
6161 self .fail ("Unable to convert non string value to TopologyConfig" , param , ctx )
6262
63+
6364def topology_has_aws_resources (topology : TopologyConfig ) -> bool :
6465 """
6566 Check if the topology has any AWS resources.
@@ -78,6 +79,7 @@ def topology_has_aws_resources(topology: TopologyConfig) -> bool:
7879 or topology .wants_logslurp
7980 )
8081
82+
8183def terraform_apply (public_key_name : Optional [str ], topology : TopologyConfig ) -> None :
8284 """
8385 Apply the Terraform configuration to set up the AWS environment.
@@ -95,7 +97,7 @@ def terraform_apply(public_key_name: Optional[str], topology: TopologyConfig) ->
9597 if not topology_has_aws_resources (topology ):
9698 click .secho ("No AWS resources requested, skipping terraform" , fg = "yellow" )
9799 return
98-
100+
99101 if public_key_name is None :
100102 raise Exception (
101103 "--public-key-name was not provided, but it is required for AWS resources."
@@ -106,7 +108,7 @@ def terraform_apply(public_key_name: Optional[str], topology: TopologyConfig) ->
106108 raise Exception (
107109 f"Command 'terraform init' failed with exit status { result .returncode } : { result .stderr } "
108110 )
109-
111+
110112 sgw_count = topology .total_sgw_count
111113 cbs_count = topology .total_cbs_count
112114 lb_count = topology .total_lb_count
@@ -388,6 +390,7 @@ def cli_entry(
388390 steps ,
389391 )
390392
393+
391394def script_entry (
392395 topology : TopologyConfig ,
393396 public_key_name : Optional [str ],
@@ -407,11 +410,16 @@ def script_entry(
407410 )
408411 else :
409412 args = [
410- "--topology" , topology ,
411- "--public-key-name" , public_key_name ,
412- "--tdk-config-in" , tdk_config_in ,
413- "--private-key" , private_key ,
414- "--tdk-config-out" , tdk_config_out
413+ "--topology" ,
414+ topology ,
415+ "--public-key-name" ,
416+ public_key_name ,
417+ "--tdk-config-in" ,
418+ tdk_config_in ,
419+ "--private-key" ,
420+ private_key ,
421+ "--tdk-config-out" ,
422+ tdk_config_out ,
415423 ]
416424 cli_entry (args )
417425
0 commit comments