Delete Security Services #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }}" | ||
AccessAnalyser: | ||
needs: validate-services | ||
if: contains(needs.validate-services.outputs.services, 'access-analyser') | ||
uses: ./.github/workflows/stackset_workflow.yml | ||
Check failure on line 32 in .github/workflows/delete_stack.yml GitHub Actions / Delete Security ServicesInvalid workflow file
|
||
with: | ||
stack-set-name: Access-analyser | ||
stack-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 | ||
stack-instance-region: us-east-1 | ||
secrets: | ||
AWS_ROLE_TO_ASSUME: ${{ secrets.AWS_GITHUB_OIDC_ROLE }} | ||
account-ids: ${{ secrets.ACCOUNT_IDS }} | ||