nicka/serverless-plugin-diff

Diff against outdated output

Lusitaniae opened this issue · 0 comments

I'm preparing changes and deploying them across dev/stage/prod.

I already deploy dev and staging, to be safe I want to do a diff against prod before deployment.

However, the diff will show outdated output (from the stage deployment) rather than production

sls diff --stage prod --region us-east-1

     ApiGatewayRestApi: {
       Properties: {
-        Name: "App1 (Serverless prod)"
+        Name: "App1 (Serverless stage)"
       }
     }
   }
   Outputs: {
     ApiGatewayRestApiId: {
       Export: {
-        Name: "app1-gateway-prod-ExtApiGatewayRestApiId"
+        Name: "app1-gateway-stage-ExtApiGatewayRestApiId"
       }
     }
     ApiGatewayRestApiRootResourceId: {
       Export: {
-        Name: "app1-gateway-prod-ExtApiGatewayRestApiRootResourceId"
+        Name: "app1-gateway-stage-ExtApiGatewayRestApiRootResourceId"
       }
     }
   }
 }

(these changes are not expected, I'm deploying stage: prod, and the name should stay the same)

Related to #14 I guess

I'd suggest

  1. Update documentation (Running deploy --noDeploy prior to the diff command, solves the issue, by updating the local cloudformation template), and/or
  2. Implement suggestion in #14