aws-actions / aws-cloudformation-github-deploy

Deploys AWS CloudFormation Stacks
MIT License
251 stars 121 forks source link

Action fail after 1 hour even if timeout-in-minutes is set to bigger value #101

Open igor-zmitrovich opened 1 year ago

igor-zmitrovich commented 1 year ago

Hello!

I have a Stack that creates a database from the snapshot. Unfortunately it may take up to 2 hours to set up.

When I am using your action like this:

    - name: Create production database copy CloudFormation stack
      uses: aws-actions/aws-cloudformation-github-deploy@v1
      with:
        name: ${{ inputs.jira_id }}-production-db-copy
        template: .github/actions/create_production_db_copy/production-copy.json
        no-fail-on-empty-changeset: "1"
        timeout-in-minutes: 120

It fails after 1 hour:

Run aws-actions/aws-cloudformation-github-deploy@v1
  with:
    name: TICKET-123-production-db-copy
    template: .github/actions/create_production_db_copy/production-copy.json
    no-fail-on-empty-changeset: 1
    timeout-in-minutes: 120
    capabilities: CAPABILITY_IAM
    no-execute-changeset: 0
    no-delete-failed-changeset: 0
    disable-rollback: 0
    termination-protection: 0
  env:
    pythonLocation: /home/ubuntu/actions-runner/_work/_tool/Python/3.9.16/x64
    PKG_CONFIG_PATH: /home/ubuntu/actions-runner/_work/_tool/Python/3.9.16/x64/lib/pkgconfig
    Python_ROOT_DIR: /home/ubuntu/actions-runner/_work/_tool/Python/3.9.16/x64
    Python2_ROOT_DIR: /home/ubuntu/actions-runner/_work/_tool/Python/3.9.16/x64
    Python3_ROOT_DIR: /home/ubuntu/actions-runner/_work/_tool/Python/3.9.16/x64
    LD_LIBRARY_PATH: /home/ubuntu/actions-runner/_work/_tool/Python/3.9.16/x64/lib
    AWS_DEFAULT_REGION: eu-central-1
    AWS_REGION: eu-central-1
    AWS_ACCESS_KEY_ID: ***
    AWS_SECRET_ACCESS_KEY: ***
    AWS_SESSION_TOKEN: ***

Error: Resource is not in the state stackCreateComplete

Looks like the timeout-in-minutes is passed to AWS CloudFormation API, but the action ignores the value and still fails after 1 hour.