nicka / serverless-plugin-diff Goto Github PK
View Code? Open in Web Editor NEWPlugin for Serverless v1 which compares local AWS CloudFormation templates against deployed ones.
Plugin for Serverless v1 which compares local AWS CloudFormation templates against deployed ones.
When having a large serverless application (imagine over 20 lambdas, plus cloud formation code managing all kinds of resources)
I'd be more interested in running a diff on the cloudformation infra changes alone rather go through all the changes being made to update the lambdas (S3 filenames, hashes, etc)
Serverless: Deprecation warning: CLI options definitions were upgraded with "type" property (which could be one of "string", "boolean", "multiple"). Below listed plugins do not predefine type for introduced options:
- ServerlessPlugin for "diffTool", "localTemplate"
Please report this issue in plugin issue tracker.
Starting with next major release, this will be communicated with a thrown error.
More Info: https://www.serverless.com/framework/docs/deprecations/#CLI_OPTIONS_SCHEMA
Serverless: Deprecation warning: Unresolved variable references will be communicated with a thrown error, starting from next major
More Info: https://www.serverless.com/framework/docs/deprecations/#VARIABLES_ERROR_ON_UNRESOLVED
It would be nice if the plugin would support an option to compare the original and not the processed CF template (getTemplate() property TemplateStage).
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command create
Serverless: Load command install
Serverless: Load command package
Serverless: Load command deploy
Serverless: Load command deploy:function
Serverless: Load command deploy:list
Serverless: Load command deploy:list:functions
Serverless: Load command invoke
Serverless: Load command invoke:local
Serverless: Load command info
Serverless: Load command logs
Serverless: Load command metrics
Serverless: Load command print
Serverless: Load command remove
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command slstats
Serverless: Load command plugin
Serverless: Load command plugin
Serverless: Load command plugin:install
Serverless: Load command plugin
Serverless: Load command plugin:uninstall
Serverless: Load command plugin
Serverless: Load command plugin:list
Serverless: Load command plugin
Serverless: Load command plugin:search
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command webpack
Serverless: Load command prune
Serverless: Load command diff
Serverless: Load command login
Serverless: Load command logout
Serverless: Load command generate-event
Serverless: Load command test
Serverless: Load command dashboard
Serverless: Invoke diff
Serverless: Downloading currently deployed template
Exception -----------------------------------------------
'Stack with id xxxxxxxxx does not exist'
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information ---------------------------
Operating System: darwin
Node Version: 8.9.1
Framework Version: 1.51.0
Plugin Version: 1.3.10
SDK Version: 2.1.0
serverless-plugin-diff/lib/index.js
Line 28 in 70ee590
Hello, thanks for a nice plugin :)
I am trying to automate some of our tasks, but for that, I'd need the diff to run without the need to pass the --region myregion
in the command.
While looking at the code, I noticed it uses this.serverless.service.defaults.region
, but I can't find a way to set it, how do I set this default region?
Or in this case, should the line be changed to this.serverless.service.provider.region
, or maybe add the provider region to the possible value origins?
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
deploy --noDeploy
prior to the diff command, solves the issue, by updating the local cloudformation template), and/orA declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.