Skip to content

Delete Security Services #13

Delete Security Services

Delete Security Services #13

Workflow file for this run

name: Delete Security Services
on:
workflow_dispatch:
inputs:
services:
description: 'Specify the services to delete (access-analyser, guard-duty, inspector, macie, securityhub, detective, config). Use a comma to separate multiple services.'
required: true
permissions:
id-token: write
contents: read
jobs:
validate-services:
runs-on: ubuntu-latest
outputs:
services: ${{ steps.set-services.outputs.services }}
steps:
- name: Set services from input
id: set-services
run: |
if [[ -z "${{ github.event.inputs.services }}" ]]; then
echo "No services specified. Skipping deletion."
echo "::set-output name=services::none"
else
echo "::set-output name=services::${{ github.event.inputs.services }}"
fi
AccessAnalyser:
needs: validate-services
if: contains(needs.validate-services.outputs.services, 'access-analyser')
uses: ./.github/workflows/stackset_workflow.yml
with:
stack-set-name: Access-analyser
stackset-instance-region: us-east-1
secrets:
AWS_ROLE_TO_ASSUME: ${{ secrets.AWS_GITHUB_OIDC_ROLE }}
account-ids: ${{ secrets.ACCOUNT_IDS }}
GuardDuty:
needs: validate-services
if: contains(needs.validate-services.outputs.services, 'guard-duty')
uses: ./.github/workflows/stackset_workflow.yml
with:
stack-set-name: GuardDuty
stackset-instance-region: us-east-1
secrets:
AWS_ROLE_TO_ASSUME: ${{ secrets.AWS_GITHUB_OIDC_ROLE }}
account-ids: ${{ secrets.ACCOUNT_IDS }}