Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
@aws-cdk/cloudformation-diff
Advanced tools
Utilities to diff CDK stacks against CloudFormation templates
@aws-cdk/cloudformation-diff is a package that provides tools to compare AWS CloudFormation templates. It helps in identifying the differences between two CloudFormation templates, which is useful for understanding changes before applying them.
Template Diffing
This feature allows you to compare two CloudFormation templates and identify the differences. The `diffTemplate` function takes two templates as input and returns the differences.
const { diffTemplate } = require('@aws-cdk/cloudformation-diff');
const templateA = require('./templateA.json');
const templateB = require('./templateB.json');
const differences = diffTemplate(templateA, templateB);
console.log(differences);
Change Detection
This feature helps in detecting specific changes between two templates. By iterating over the differences, you can log or handle each change individually.
const { diffTemplate } = require('@aws-cdk/cloudformation-diff');
const templateA = require('./templateA.json');
const templateB = require('./templateB.json');
const differences = diffTemplate(templateA, templateB);
differences.forEach(diff => {
console.log(`Change detected: ${diff}`);
});
Resource Comparison
This feature focuses on comparing resources within the templates. It allows you to identify changes specific to resources, which is useful for understanding the impact on infrastructure.
const { diffTemplate } = require('@aws-cdk/cloudformation-diff');
const templateA = require('./templateA.json');
const templateB = require('./templateB.json');
const differences = diffTemplate(templateA, templateB);
differences.resources.forEach(resourceDiff => {
console.log(`Resource change detected: ${resourceDiff}`);
});
cfn-diff is a package that provides similar functionality for comparing AWS CloudFormation templates. It offers tools to detect changes and differences between templates, similar to @aws-cdk/cloudformation-diff. However, it may not be as tightly integrated with the AWS CDK ecosystem.
This module is part of the AWS Cloud Development Kit project.
0.8.1 - 2018-08-08
--profile
in command-line toolkit ([@rix0rrr] in #517)Default
construct id ([@rix0rrr] in #496)LambdaRuntime.DotNetCore21
([@Mortifera] in #507)Connections
and DefaultConnections
classes ([@rix0rrr] in #453)buildSpec
parameter to take a filename ([@rix0rrr] in #470)jsii-pacmak
to 0.6.4
, which includes "language-native" type names and package coordinates ([@RomainMuller] in awslabs/jsii#130)cdk init
template ([@RomainMuller] in #490)FnJoin
signature to CloudFormation ([@RomainMuller] in #516)FAQs
Utilities to diff CDK stacks against CloudFormation templates
The npm package @aws-cdk/cloudformation-diff receives a total of 155,233 weekly downloads. As such, @aws-cdk/cloudformation-diff popularity was classified as popular.
We found that @aws-cdk/cloudformation-diff demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.