aws-actions / aws-cloudformation-github-deploy

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

Stack does not exist #127

Closed SanariSan closed 9 months ago

SanariSan commented 10 months ago

After recent updates on master branch deploying stack for the first time gives error

image

Locking to @v1.2.0 resolved the issue and deployed the stack as it was doing before

image

Problem is definitely in latest @master commits, at least it is not backwards compatible if this behavior is expected

Rough action example similar to one from screenshots to maybe help replicate (need to setup secrets and have cf template nearby):

name: Deploy

on:
  workflow_dispatch:
  workflow_call:
  push:
    branches:
      - "**"

jobs:
  backend-deploy:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Configure AWS credentials
        uses: aws-actions/configure-aws-credentials@v1-node16
        with:
          aws-access-key-id: ${{ secrets.YOUR_AWS_CLIENT_ID }}
          aws-secret-access-key: ${{ secrets.YOUR_AWS_SECRET_KEY }}
          aws-region: "eu-central-1"

      - name: Login to Amazon ECR
        uses: aws-actions/amazon-ecr-login@v1

      - name: Deploy vpc cloudformation
        continue-on-error: true
        id: vpc-cloudformation
        uses: aws-actions/aws-cloudformation-github-deploy@master
        with:
          name: "test-prod-vpc"
          template: ./cloudformation/public-vpc.yaml

      - name: Deploy server cloudformation
        id: server-cloudformation
        uses: aws-actions/aws-cloudformation-github-deploy@master
        with:
          name: "test-prod-server"
          template: ./cloudformation/server.yaml
          parameter-overrides: "Environment=prod"
rnunn-bound commented 10 months ago

We also saw this – pinning the action to 27513cdf512c25b03c3b2d771032a7d3ed8b02c9 has resolved it for us.

jheerman commented 10 months ago

I ran into this issue as well. Thanks for sharing.

kddejong commented 9 months ago

Fixed in the main branch.

natheeshsunway commented 9 months ago

I am still getting this issue, How you fixed?

SanariSan commented 9 months ago

As far as I can see /dist/index.js in master still contains outdated code. Package action finished successfully, but was unable to ship new version

image

@kddejong

kddejong commented 9 months ago

Weird. Looks like the job ran and said it was successful but nothing got pushed. I'll look into the job issue. I've update the dist with the latest commit.