@@ -377,21 +377,21 @@ pub async fn execute(log_level: &str, spec_file_path: &str, skip_prompt: bool) -
377
377
378
378
let regional_shared_config =
379
379
aws_manager:: load_config ( Some ( region. clone ( ) ) , Some ( Duration :: from_secs ( 30 ) ) ) . await ;
380
-
381
380
let regional_kms_manager = kms:: Manager :: new ( & regional_shared_config) ;
381
+
382
+ sleep ( Duration :: from_secs ( 1 ) ) . await ;
383
+ execute ! (
384
+ stdout( ) ,
385
+ SetForegroundColor ( Color :: Green ) ,
386
+ Print ( format!(
387
+ "\n \n \n STEP: create KMS encrypt key in '{region}'\n "
388
+ ) ) ,
389
+ ResetColor
390
+ ) ?;
382
391
if regional_resource
383
392
. kms_symmetric_default_encrypt_key
384
393
. is_none ( )
385
394
{
386
- sleep ( Duration :: from_secs ( 1 ) ) . await ;
387
- execute ! (
388
- stdout( ) ,
389
- SetForegroundColor ( Color :: Green ) ,
390
- Print ( format!(
391
- "\n \n \n STEP: create encryption KMS key in '{region}'\n "
392
- ) ) ,
393
- ResetColor
394
- ) ?;
395
395
let key = regional_kms_manager
396
396
. create_symmetric_default_key ( format ! ( "{}-kms-key" , spec. id) . as_str ( ) , false )
397
397
. await
@@ -413,7 +413,7 @@ pub async fn execute(log_level: &str, spec_file_path: &str, skip_prompt: bool) -
413
413
. await
414
414
. unwrap ( ) ;
415
415
} else {
416
- log:: info!( "skipping creating kms default encrypt key" ) ;
416
+ log:: info!( "skipping creating KMS default encrypt key" ) ;
417
417
}
418
418
419
419
let regional_envelope_manager = envelope:: Manager :: new (
@@ -492,19 +492,18 @@ pub async fn execute(log_level: &str, spec_file_path: &str, skip_prompt: bool) -
492
492
aws_manager:: load_config ( Some ( region. clone ( ) ) , Some ( Duration :: from_secs ( 30 ) ) ) . await ;
493
493
let regional_cloudformation_manager = cloudformation:: Manager :: new ( & regional_shared_config) ;
494
494
495
+ execute ! (
496
+ stdout( ) ,
497
+ SetForegroundColor ( Color :: Green ) ,
498
+ Print ( format!(
499
+ "\n \n \n STEP: creating EC2 instance role in the region '{region}'\n "
500
+ ) ) ,
501
+ ResetColor
502
+ ) ?;
495
503
if regional_resource
496
504
. cloudformation_ec2_instance_profile_arn
497
505
. is_none ( )
498
506
{
499
- execute ! (
500
- stdout( ) ,
501
- SetForegroundColor ( Color :: Green ) ,
502
- Print ( format!(
503
- "\n \n \n STEP: creating EC2 instance role in the region '{region}'\n "
504
- ) ) ,
505
- ResetColor
506
- ) ?;
507
-
508
507
let ec2_instance_role_tmpl =
509
508
avalanche_ops:: aws:: artifacts:: ec2_instance_role_yaml ( ) . unwrap ( ) ;
510
509
let ec2_instance_role_stack_name = regional_resource
@@ -618,6 +617,14 @@ pub async fn execute(log_level: &str, spec_file_path: &str, skip_prompt: bool) -
618
617
aws_manager:: load_config ( Some ( region. clone ( ) ) , Some ( Duration :: from_secs ( 30 ) ) ) . await ;
619
618
let regional_cloudformation_manager = cloudformation:: Manager :: new ( & regional_shared_config) ;
620
619
620
+ execute ! (
621
+ stdout( ) ,
622
+ SetForegroundColor ( Color :: Green ) ,
623
+ Print ( format!(
624
+ "\n \n \n STEP: creating a VPC in the region '{region}'\n "
625
+ ) ) ,
626
+ ResetColor
627
+ ) ?;
621
628
if regional_resource. cloudformation_vpc_id . is_none ( )
622
629
&& regional_resource
623
630
. cloudformation_vpc_security_group_id
@@ -626,15 +633,6 @@ pub async fn execute(log_level: &str, spec_file_path: &str, skip_prompt: bool) -
626
633
. cloudformation_vpc_public_subnet_ids
627
634
. is_none ( )
628
635
{
629
- execute ! (
630
- stdout( ) ,
631
- SetForegroundColor ( Color :: Green ) ,
632
- Print ( format!(
633
- "\n \n \n STEP: creating a VPC in the region '{region}'\n "
634
- ) ) ,
635
- ResetColor
636
- ) ?;
637
-
638
636
let vpc_tmpl = avalanche_ops:: aws:: artifacts:: vpc_yaml ( ) . unwrap ( ) ;
639
637
let vpc_stack_name = regional_resource. cloudformation_vpc . clone ( ) . unwrap ( ) ;
640
638
let vpc_params = Vec :: from ( [
0 commit comments