This repository has been archived by the owner on Oct 17, 2024. It is now read-only.
Releases: awslabs/goformation
Releases · awslabs/goformation
v2.1.0
v2.0.0
2.0.0 (2019-03-10)
Code Refactoring
BREAKING CHANGES
- generator: this PR refactors the auto-generated CloudFormation resources out of the cloudformation package and into a dedicated package (resources). This helps keep the auto generated files separate from others.
E.g. cloudformation.AWSSnsTopic{} becomes resources.AWSSnsTopic{}
v1.4.1
v1.4.0
v1.3.0
1.3.0 (2019-03-09)
Bug Fixes
- CI: speed up PR builds by only downloading the cfn spec and regenerating resources on cron schedule (not on every build) (7ae2a32)
- CI: Update TravisCI configuration based on https://github.com/se… (#180) (88e1e85)
- CI: Update TravisCI configuration for semantic-release to use jobs (f6c2fee)
Features
Resource Policies
Adds support for UpdatePolicy, CreationPolicy and DeletionPolicy when composing templates.
For example:
asg := cloudformation.AWSAutoScalingAutoScalingGroup{}
asg.SetUpdatePolicy(&cloudformation.UpdatePolicy{
AutoScalingRollingUpdate: &cloudformation.AutoScalingRollingUpdate{
MaxBatchSize: 2,
MinInstancesInService: 2,
PauseTime: "P5M",
WaitOnResourceSignals: true,
},
})
template := &cloudformation.Template{
Resources: map[string]interface{}{
"AutoScalingGroup": asg
},
}
Fn::ImportValue
Small patch release that just fixes a bug with using cloudformation.ImportValue()
when composing templates.
Support for AWS Intrinsic Functions
- Feature: AWS SSM Parameter types are now included in the generated JSON Schema (#115)
- Feature: Support for SQS event sources when composing AWS SAM functions (#107)
- Feature: Use CloudFormation Intrinsic Functions such as
Ref
andGetAtt
when composing CloudFormation templates.
The following list of functions are available to use when creating templates:
cloudformation.Ref(logicalName string)
cloudformation.GetAtt(logicalName string, attribute string)
cloudformation.ImportValue(name string)
cloudformation.Base64(input string)
cloudformation.CIDR(ipBlock, count, cidrBits string)
cloudformation.FindInMap(mapName, topLevelKey, secondLevelKey string)
cloudformation.GetAZs(region string)
cloudformation.Join(delimiter string, values []string)
cloudformation.Select(index string, list []string)
cloudformation.Split(delimiter, source string)
cloudformation.Sub(value string)
Example usage:
template := &cloudformation.Template{
Resources: map[string]interface{}{
"TestBucket": cloudformation.AWSS3Bucket{
BucketName: "test-bucket",
},
"TestBucketPolicy": cloudformation.AWSS3BucketPolicy{
Bucket: cloudformation.Ref("TestBucket"),
},
},
}