New features:
- `stacks diff` - compares compiled template and what's currently in CloudFormation and shows the difference. 110
- Client-side template validation for null values. 20
---
`stacks diff` usage example:
$ stacks create --template buckets.yaml --env dev --property bucket_name_prefix=my-awesome-bucket --property buckets_count=1 -d
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "S3 buckets",
"Resources": {
"S3Bucket0": {
"Properties": {
"BucketName": "my-awesome-bucket0-us-east-1"
},
"Type": "AWS::S3::Bucket"
}
}
}
Name: s3-buckets
Tags: Env=dev, MD5Sum=0144615ae87286728cca830042baf53d
Template size: 240
$ stacks create --template buckets.yaml --env dev --property bucket_name_prefix=my-awesome-bucket
$ stacks list
s3-buckets CREATE_COMPLETE
$ stacks diff --template buckets.yaml --env dev --property bucket_name_prefix=my-awesome-bucket --property buckets_count=2
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "S3 buckets",
"Resources": {
"S3Bucket0": {
"Properties": {
"BucketName": "my-awesome-bucket0-us-east-1"
},
"Type": "AWS::S3::Bucket"
+ },
+ "S3Bucket1": {
+ "Properties": {
+ "BucketName": "my-awesome-bucket1-us-east-1"
+ },
+ "Type": "AWS::S3::Bucket"
}
}
}
$ stacks update --template buckets.yaml --env dev --property bucket_name_prefix=my-awesome-bucket --property buckets_count=2 -f
2018-09-16 09:37:32.489000+01:00 UPDATE_IN_PROGRESS AWS::CloudFormation::Stack s3-buckets User Initiated
2018-09-16 09:37:35.476000+01:00 CREATE_IN_PROGRESS AWS::S3::Bucket S3Bucket1
2018-09-16 09:37:36.058000+01:00 UPDATE_IN_PROGRESS AWS::S3::Bucket S3Bucket0
2018-09-16 09:37:36.147000+01:00 CREATE_IN_PROGRESS AWS::S3::Bucket S3Bucket1 Resource creation Initiated
2018-09-16 09:37:56.293000+01:00 UPDATE_COMPLETE AWS::S3::Bucket S3Bucket0
2018-09-16 09:37:56.577000+01:00 CREATE_COMPLETE AWS::S3::Bucket S3Bucket1
2018-09-16 09:37:58.553000+01:00 UPDATE_COMPLETE_CLEANUP_IN_PROGRESS AWS::CloudFormation::Stack s3-buckets
2018-09-16 09:37:59.449000+01:00 UPDATE_COMPLETE AWS::CloudFormation::Stack s3-buckets
$ stacks diff --template buckets.yaml --env dev --property bucket_name_prefix=my-awesome-bucket --property buckets_count=2
$