diff --git a/bin/p6lzctl b/bin/p6lzctl index 41194a6..532655d 100755 --- a/bin/p6lzctl +++ b/bin/p6lzctl @@ -208,8 +208,10 @@ p6_lz_cmd_destroy() { p6_h3 "Cleaning CLI" local audit_account_name=$(p6_lz_util_audit_account_name) p6_aws_svc_organizations_sts_run_as $audit_account_name p6_lz_destroy_audit + local logarchive_account_name=$(p6_lz_util_logarchive_account_name) p6_aws_svc_organizations_sts_run_as $logarchive_account_name p6_lz_destroy_logarchive + p6_lz_destroy_management p6_h3 "Cleaning CDK" @@ -251,19 +253,19 @@ p6_lz_destroy_management() { # Piece of Shit -- do not use # p6_h5 "Management: Inspector" - # p6_aws_svc_inspector_from_management_off $audit_account_id + # p6_cirrus_inspector_from_management_off $audit_account_id p6_h5 "Management: Security Hub" - p6_aws_svc_securityhub_from_management_off $audit_account_id + p6_cirrus_securityhub_from_management_off $audit_account_id p6_h5 "Management: Config" - p6_aws_svc_configservice_from_management_off $audit_account_id $AWS_REGION + p6_cirrus_configservice_from_management_off $audit_account_id $AWS_REGION p6_h5 "Management: CloudTrail" - p6_aws_svc_cloudtrail_from_management_off $audit_account_id + p6_cirrus_cloudtrail_from_management_off $audit_account_id p6_h5 "Management: CW Logs" - p6_aws_svc_logs_groups_prefix_delete "p6-lz-" + p6_cirrus_logs_groups_prefix_delete "p6-lz-" p6_return_void } @@ -280,16 +282,17 @@ p6_lz_destroy_audit() { # Piece of Shit -- do not use # p6_h4 "Audit: Inspector" - # p6_aws_svc_inspector_from_delegated_off + # p6_cirrus_inspector_from_delegated_off p6_h4 "Audit: Security Hub" - p6_aws_svc_securityhub_from_delegated_off + p6_cirrus_securityhub_from_delegated_off p6_h4 "Audit: Config" true # CDK actually works p6_h4 "Audit: CloudTrail" - p6_cirrus_cloudtrail_trail_delete + p6_cirrus_cloudtrail_trail_delete "p6-lz-" + p6_h4 "Audit: CW Logs" p6_lz_util_logs_delete @@ -545,17 +548,17 @@ p6_lz_run_phase_3_management_account() { local audit_account_id=$(p6_lz_util_audit_account_id_get) p6_h3 "Phase 3: Management: Delegating CloudTrail" - p6_aws_svc_cloudtrail_from_management_on $audit_account_id + p6_cirrus_cloudtrail_from_management_on $audit_account_id p6_h3 "Phase 3: Management: Delegating Config" - p6_aws_svc_configservice_from_management_on $audit_account_id $AWS_REGION + p6_cirrus_configservice_from_management_on $audit_account_id $AWS_REGION p6_h3 "Phase 3: Management: Delegating SecurityHub" - p6_aws_svc_securityhub_from_management_on $audit_account_id + p6_cirrus_securityhub_from_management_on $audit_account_id # Piece of Shit -- do not use # p6_h3 "Phase 3: Management: Delegate Inspector" - # p6_aws_svc_inspector_from_management_on $audit_account_id + # p6_cirrus_inspector_from_management_on $audit_account_id p6_return_void } @@ -605,14 +608,14 @@ p6_lz_run_phase_3_audit_account() { p6_h3 "Phase 3: Audit: CloudTrail Start Logging" local audit_account_name=$(p6_lz_util_audit_account_name) - p6_aws_svc_organizations_sts_run_as $audit_account_name p6_cirrus_cloudtrail_logging_start + p6_aws_svc_organizations_sts_run_as $audit_account_name p6_cirrus_cloudtrail_trail_logging_start p6-lz- p6_h3 "Phase 3: Audit-2" # p6_awscdk_cli_execute $action p6-lz-audit-2 # Piece of Shit -- do not use # # Inspector - # p6_aws_svc_organizations_sts_run_as $audit_account_name p6_lz_util_inspector_setup + # p6_cirrus_organizations_sts_run_as $audit_account_name p6_lz_util_inspector_setup p6_return_void } @@ -812,8 +815,8 @@ p6_lz_util_cdk_context_add_logarchive_bucket() { # ###################################################################### # p6_lz_util_inspector_setup() { -# p6_aws_svc_inspector_role_service_linked_create -# p6_aws_svc_inspector_organization_members_enable +# p6_cirrus_inspector_role_service_linked_create +# p6_cirrus_inspector_organization_members_enable # p6_return_void # } @@ -841,7 +844,7 @@ p6_lz_util_stacks_list() { ###################################################################### p6_lz_util_logs_delete() { - p6_aws_svc_logs_groups_prefix_delete "p6-lz-" + p6_cirrus_logs_groups_prefix_delete "p6-lz-" p6_return_void }