Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Support for AWS Intrinsic Functions

Compare
Choose a tag to compare
@PaulMaddox PaulMaddox released this 14 Sep 05:59
· 739 commits to master since this release
90ef940
  • 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 and GetAtt 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"),
		},
	},
}