workflows:
  up:
    description: |
      Run 'terraform apply' on essential components for a stack and all its derived components.
      The stack must be provided on the command line: atmos workflow provision -f workflow1 -s <stack>
    steps:
      - command: terraform apply vpc -auto-approve
        type: atmos
      - command: terraform apply acm -auto-approve
        type: atmos
      - command: terraform apply s3 -auto-approve
        type: atmos
      - command: terraform apply cloudfront -auto-approve
        type: atmos
      - command: terraform apply rds -auto-approve
        type: atmos
      - command: terraform apply sqs -auto-approve
        type: atmos
      - command: terraform apply event-bridge -auto-approve
        type: atmos
      - command: terraform apply eks -auto-approve
        type: atmos

  helm:
    description: |
      Run 'make targets to install helm dependencies'
    steps:
      - command: terraform apply eks-helm

  dn:
    description: |
      Run 'terraform apply' on essential components for a stack and all its derived components.
      The stack must be provided on the command line: atmos workflow provision -f workflow1 -s <stack>
    steps:
      - command: terraform destroy eks -auto-approve
      - command: terraform destroy event-bridge -auto-approve
      - command: terraform destroy sqs -auto-approve
      - command: terraform destroy rds -auto-approve
      - command: terraform destroy cloudfront -auto-approve
      - command: terraform destroy s3 -auto-approve
      # - command: terraform destroy acm -auto-approve
      - command: terraform destroy vpc -auto-approve
