cfn

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DeletePolicy will ensure CloudFormation deletes the resource and all its
	// content if applicable during either stack deletion or resource replacement
	DeletePolicy Policy = "Delete"

	// RetainPolicy will ensure CloudFormation keeps the resource without deleting
	// the resource and it contents during either stack deletion or resource replacement
	RetainPolicy = "Retain"

	// SnapshotPolicy will ensure CloudFormation creates a snapshot of the resource
	// before deleting it during either stack deletion or resource replacement
	SnapshotPolicy = "Snapshot"
)
View Source
const (
	// TemplateFormatVersion represents the latest and only supported template version
	TemplateFormatVersion = "2010-09-09"
)

Variables

View Source
var (
	// SSMKeyRegex ensures an SSM parameter key consists of a valid parameter name and
	// optional version
	SSMKeyRegex = regexp.MustCompile(`[a-zA-Z0-9_.\-/]+(:\d+)?`)
)

Functions

func SSMRef added in v0.10.0

func SSMRef(key string) string

SSMRef constructs an SSM dynamic reference that can be used by a CloudFormation stack to lookup a value from Systems Manager Parameter Store. Supported values are of type String or StringList only. Key consists of a parameter name followed by an optional version, separated with a colon:

<ParameterName>:<Version> e.g. S3AccessControl:2

If no version is provided, the latest version of the parameter will be retrieved. Parameter names are also case-sensitive, see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html#dynamic-references-ssm

func SSMRefStrict added in v0.10.0

func SSMRefStrict(key string) (string, error)

SSMRefStrict constructs an SSM dynamic reference that can be used by a CloudFormation stack to lookup a value from Systems Manager Parameter Store. Supported values are of type String or StringList only. Key consists of a parameter name followed by an optional version, separated with a colon:

<ParameterName>:<Version> e.g. S3AccessControl:2

If no version is provided, the latest version of the parameter will be retrieved. The key will be validated against the expected regex [a-zA-Z0-9_.\-/]+(:\d+)? removing any likelihood of failure during stack creation or update. Paramerer names are also case-sensitive, see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html#dynamic-references-ssm

func SSMSecureRef added in v0.10.0

func SSMSecureRef(key string) string

SSMSecureRef constructs an SSM secure dynamic reference that can be used by a CloudFormation stack to lookup a SecureString value from Systems Manager Parameter Store. CloudFormation will never store the parameter value and will always perform a lookup during stack create or update operations. Key consists of a parameter name followed by an optional version, separated with a colon:

<ParameterName>:<Version> e.g. S3AccessControl:2

If no version is provided, the latest version of the parameter will be retrieved. Parameter names are also case-sensitive, see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html#dynamic-references-ssm-secure-strings

Only a subset of resource properties currently support SSM secure dynamic references, see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html#template-parameters-dynamic-patterns-resources

func SSMSecureRefStrict added in v0.10.0

func SSMSecureRefStrict(key string) (string, error)

SSMSecureRefStrict constructs an SSM secure dynamic reference that can be used by a CloudFormation stack to lookup a SecureString value from Systems Manager Parameter Store. CloudFormation will never store the parameter value and will always perform a lookup during stack create or update operations. Key consists of a parameter name followed by an optional version, separated with a colon:

<ParameterName>:<Version> e.g. S3AccessControl:2

If no version is provided, the latest version of the parameter will be retrieved. The key will be validated against the expected regex [a-zA-Z0-9_.\-/]+(:\d+)? removing any likelihood of failure during stack creation or update. Paramerer names are also case-sensitive, see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html#dynamic-references-ssm-secure-strings

Only a subset of resource properties currently support SSM secure dynamic references, see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html#template-parameters-dynamic-patterns-resources

func SecretsManagerRef added in v0.10.0

func SecretsManagerRef(key SecretsManagerKey) string

SecretsManagerRef constructs a Secrets Manager dynamic reference that can be used by a CloudFormation stack for retrieving an entire secret or individual secret value from AWS Secrets Manager. Secrets can be database credentials, passwords, third-party API keys or arbitrary text. CloudFormation will never store the parameter value and will always perform a lookup during stack create or update operations.

The lookup key used for secret retrieval is composed of many different parts, the majority of which are optional, and are only used to fine-tune its retrieval, see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html#dynamic-references-secretsmanager

secret-id:secret-string:json-key:version-stage:version-id e.g. TestSecret:SecureString:Key::1

Secrets retrieval is supported for all resource properties and will not show up in the CloudFormation stack. However, there is a risk that it could be shown in plaintext through the console, depending on which property was set.

func SecretsManagerRefStrict added in v0.10.0

func SecretsManagerRefStrict(key SecretsManagerKey) (string, error)

SecretsManagerRefStrict constructs a Secrets Manager dynamic reference that can be used by a CloudFormation stack for retrieving an entire secret or individual secret value from AWS Secrets Manager. Secrets can be database credentials, passwords, third-party API keys or arbitrary text. CloudFormation will never store the parameter value and will always perform a lookup during stack create or update operations.

The lookup key used for secret retrieval is composed of many different parts, the majority of which are optional, and are only used to fine-tune its retrieval. Each composed part of the key will be validated before any reference is constructed, see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html#dynamic-references-secretsmanager

secret-id:secret-string:json-key:version-stage:version-id e.g. TestSecret:SecureString:Key::1

Secrets retrieval is supported for all resource properties and will not show up in the CloudFormation stack. However, there is a risk that it could be shown in plaintext through the console, depending on which property was set.

Types

type AppStreamCreationPolicy

type AppStreamCreationPolicy struct {
	// StartFleet identifies whether a fleet should be started or not, see:
	// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-creationpolicy.html#cfn-attributes-updatepolicy-replacingupdate-StartFleet
	//
	// @Optional
	StartFleet *StartFleetCreationPolicy `json:"StartFleet,omitempty"`
}

AppStreamCreationPolicy configures a creation policy for AWS AppStream 2.0 fleet, see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-creationpolicy.html

type AppStreamUpdatePolicy

type AppStreamUpdatePolicy struct {
	// StopBeforeUpdate will stop the specified fleet before the update commences, see:
	// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-replacingupdate-StopBeforeUpdate
	//
	// @Optional
	StopBeforeUpdate bool `json:"StopBeforeUpdate,omitempty"`

	// StartAfterUpdate will start the specified fleet after an update completes, see:
	// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-replacingupdate-StartAfterUpdate
	//
	// @Optional
	StartAfterUpdate bool `json:"StartAfterUpdate,omitempty"`
}

AppStreamUpdatePolicy configures a policy for how CloudFormation handles an AppStream fleet during an update, see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html

type AutoScalingCreationPolicy

type AutoScalingCreationPolicy struct {
	// AutoScalingCreationPolicy defines the number of EC2 instances within an auto scaling group
	// that must signal successful creation, see:
	// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-creationpolicy.html#cfn-attributes-creationpolicy-autoscalingcreationpolicy-minsuccessfulinstancespercent
	//
	// @Optional
	AutoScalingCreationPolicy *MinimumSuccessfulInstancesCreationPolicy `json:"AutoScalingCreationPolicy,omitempty"`

	// ResourceSignal controls the number of success signals that CloudFormation must receive,
	// within a configurable timeout period, before creation of a resource is deemed successful,
	// see:
	// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-creationpolicy.html#cfn-attributes-creationpolicy-resourcesignal
	//
	// @Optional
	ResourceSignal *ResourceSignalCreationPolicy `json:"ResourceSignal,omitempty"`
}

AutoScalingCreationPolicy configures the creation policy for creating EC2 instances within an auto scaling group, see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-creationpolicy.html#cfn-attributes-creationpolicy-autoscalingcreationpolicy

type AutoScalingReplacingUpdatePolicy

type AutoScalingReplacingUpdatePolicy struct {
	// WillReplace specifies whether an auto scaling group and the instances it contains
	// are replaced during an update, see:
	// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-replacingupdate-willreplace
	//
	// @Optional
	WillReplace bool `json:"WillReplace,omitempty"`
}

AutoScalingReplacingUpdatePolicy configures a policy for how CloudFormation handles replacement updates to an auto scaling group, see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-replacingupdate

type AutoScalingRollingUpdatePolicy

type AutoScalingRollingUpdatePolicy struct {
	// MaxBatchSize specifies the maximum number of instances that will be updated, see:
	// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-rollingupdate-maxbatchsize
	//
	// @Optional
	MaxBatchSize int `json:"MaxBatchSize,omitempty"`

	// MinInstancesInService specifies the minimum number of instances that must be
	// in service within the auto scaling group while old instances are being updated,
	// see:
	// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-rollingupdate-mininstancesinservice
	//
	// @Optional
	MinInstancesInService int `json:"MinInstancesInService,omitempty"`

	// MinSuccessfulInstancesPercent specifies the percentage of instances in an auto
	// scaling group that must signal success for an update to succeed, see:
	// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-rollingupdate-minsuccessfulinstancespercent
	//
	// @Optional
	MinSuccessfulInstancesPercent int `json:"MinSuccessfulInstancesPercent,omitempty"`

	// PauseTime is the amount of time CloudFormation pauses after making a change to a
	// batch of instances to give those instances time to start software applications.
	// Time must be specified in the ISO6801 duration format, https://en.wikipedia.org/wiki/ISO_8601#Durations,
	// see:
	// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-rollingupdate-pausetime
	//
	// @Optional
	PauseTime string `json:"PauseTime,omitempty"`

	// SuspendProcesses specifies the auto scaling processes to suspend during an update, see:
	// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-rollingupdate-suspendprocesses
	//
	// @Optional
	SuspendProcesses []string `json:"SuspendProcesses,omitempty"`

	// WaitOnResourceSignals specifies whether the auto scaling group should wait
	// on signals from new instances during an update, see:
	// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-rollingupdate-waitonresourcesignals
	//
	// @Optional
	WaitOnResourceSignals bool `json:"WaitOnResourceSignals,omitempty"`
}

AutoScalingRollingUpdatePolicy configures a policy for how CloudFormation handles rolling updates to an auto scaling group, see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-rollingupdate

type AutoScalingScheduledActionUpdatePolicy

type AutoScalingScheduledActionUpdatePolicy struct {
	// IgnoreUnmodifiedGroupSizeProperties specifies whether CloudFormation should ignore
	// any differences in size of an auto scaling group before and after the update, see:
	// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-scheduledactions-ignoreunmodifiedgroupsizeproperties
	//
	// @Optional
	IgnoreUnmodifiedGroupSizeProperties bool `json:"IgnoreUnmodifiedGroupSizeProperties,omitempty"`
}

AutoScalingScheduledActionUpdatePolicy configures a policy for how CloudFormation handles updates for the MinSize, MaxSize and DesiredCapacity properties of an auto scaling group during an update, see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-scheduledactions

type AutoScalingUpdatePolicy

type AutoScalingUpdatePolicy struct {
	// AutoScalingReplacingUpdate specifies a policy for how CloudFormation handles
	// replacement updates for an auto scaling group, see:
	// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-replacingupdate
	//
	// @Optional
	AutoScalingReplacingUpdate *AutoScalingReplacingUpdatePolicy `json:"AutoScalingReplacingUpdate,omitempty"`

	// AutoScalingRollingUpdate specifies a policy for how CloudFormation handles
	// rolling updates for an auto scaling group, see:
	// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-rollingupdate
	//
	// @Optional
	AutoScalingRollingUpdate *AutoScalingReplacingUpdatePolicy `json:"AutoScalingRollingUpdate,omitempty"`

	// AutoScalingScheduledAction specifies a policy for how CloudFormation handles
	// updates for the MinSize, MaxSize and DesiredCapacity properties of an auto
	// scaling group, see:
	// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-scheduledactions
	//
	// @Optional
	AutoScalingScheduledAction *AutoScalingScheduledActionUpdatePolicy `json:"AutoScalingScheduledAction,omitempty"`
}

AutoScalingUpdatePolicy configures a policy for how CloudFormation handles the updating of instances within an auto scaling group, see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html

type CodeDeployLambdaAliasUpdatePolicy

type CodeDeployLambdaAliasUpdatePolicy struct {
	// AfterAllowTrafficHook specifies the name of the Lambda function to
	// run after traffic routing completes, see:
	// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-codedeploylambdaaliasupdate-afterallowtraffichook
	//
	// @Optional
	AfterAllowTrafficHook string `json:"AfterAllowTrafficHook,omitempty"`

	// ApplicationName specifies the name of the CodeDeploy application, see:
	// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-codedeploylambdaaliasupdate-applicationname
	ApplicationName string `json:"ApplicationName"`

	// BeforeAllowTrafficHook specifies the name of the Lambda function to
	// run before traffic routing starts, see:
	// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-codedeploylambdaaliasupdate-beforeallowtraffichook
	//
	// @Optional
	BeforeAllowTrafficHook string `json:"BeforeAllowTrafficHook,omitempty"`

	// DeploymentGroupName specifies the name of the CodeDeploy deployment group
	// where the traffic shifting policy is defined, see:
	// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-codedeploylambdaaliasupdate-deploymentgroupname
	DeploymentGroupName string `json:"DeploymentGroupName"`
}

CodeDeployLambdaAliasUpdatePolicy configures a policy to perform a CodeDeploy deployment of a Lambda when a version alias changes, see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-codedeploylambdaaliasupdate

type EnableVersionUpgradeUpdatePolicy

type EnableVersionUpgradeUpdatePolicy struct {
	// EnableVersionUpgrade specifies whether the entire OpenSearch Service
	// or Elasticsearch domain is replaced during a modification to its
	// existing version, see:
	// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-upgradeopensearchdomain
	EnableVersionUpgrade bool `json:"EnableVersionUpgrade,omitempty"`
}

EnableVersionUpgradeUpdatePolicy configures a policy for how CloudFormation manages the update of an OpenSearch or Elasticsearch Domain, see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-upgradeopensearchdomain

type Export

type Export struct {
	// Name defines the unique name of exported value
	Name string `json:"Name"`
}

Export is used to define an output value that is to be exported for cross-stack import

type KeyedMapping added in v0.7.0

type KeyedMapping map[string]NamedValues

KeyedMapping defines a keyed mapped of named values that supports the use of the Fn::FindInMap intrinsic function

type MinimumSuccessfulInstancesCreationPolicy

type MinimumSuccessfulInstancesCreationPolicy struct {
	// MinSuccessfulInstancesPercent is a percentage of EC2 instances within an auto scaling
	// group that must signal successful creation. CloudFormation will round the percentage
	// to the nearest tenth of a percent, see:
	// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-creationpolicy.html#cfn-attributes-creationpolicy-autoscalingcreationpolicy-minsuccessfulinstancespercent
	//
	// @Optional
	MinSuccessfulInstancesPercent int `json:"MinSuccessfulInstancesPercent,omitempty"`
}

MinimumSuccessfulInstancesPolicy configures the percentage of EC2 instances within an auto scaling group that must signal successful creation, see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-creationpolicy.html#cfn-attributes-creationpolicy-autoscalingcreationpolicy-minsuccessfulinstancespercent

type NamedValues added in v0.7.0

type NamedValues []string

NamedValues represents a slice of values within a mapping

func MappingValues added in v0.7.0

func MappingValues(v ...string) NamedValues

MappingValues supports the dynamic setting of named values for any keyed entry within a CloudFormation mapping

func (NamedValues) MarshalJSON added in v0.7.0

func (n NamedValues) MarshalJSON() ([]byte, error)

MarshalJSON provides a custom marshaller to ensure a CloudFormation mapping containing either a single value or a list is serialised in the expected format

type Output

type Output struct {
	// Description allows for a user friendly description of the output value
	Description string `json:"Description"`

	// Value to be returned when describing the stack through the console or CLI
	Value interface{} `json:"Value"`

	// Export can be used to define an output that is exported for for cross-stack import.
	// An export name must be unique across a region, and will prevent the deletion
	// of the source stack if imported
	//
	// @Optional
	Export *Export `json:"Export,omitempty"`
}

Output should be used to define an output value that can be imported into other stacks, or returned as part of a response when describing a stack through the console or CLI, see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/outputs-section-structure.html

type Parameter

type Parameter struct {
	// AllowedPattern defines a regular expression for validating the value of a parameter
	//
	// @Optional
	AllowedPattern string `json:"AllowedPattern,omitempty"`

	// AllowedValues defines a list of values supported by the parameter
	//
	// @Optional
	AllowedValues []interface{} `json:"AllowedValues,omitempty"`

	// ConstraintDescription is a custom message that is displayed when the template is validated
	// and a parameter has violated its defined allowed pattern.
	//
	// The default constraint message:
	//  Malformed input-parameter <NAME> must match pattern <ALLOWED_PATTERN>
	// and with constraint description set:
	//  Malformed input-parameter <NAME> <CONSTRAINT_DESCRIPTION>
	//
	// @Optional
	ConstraintDescription string `json:"ConstraintDescription,omitempty"`

	// Default value to use if none is provided to the CloudFormation template. The default value
	// must adhere to the allowed pattern if defined
	//
	// @Optional
	Default interface{} `json:"Default,omitempty"`

	// Description provides a way to describe the parameter in a user friendly manner, limited
	// to 4000 characters in length
	//
	// @Optional
	Description string `json:"Description,omitempty"`

	// MaxLength defines the maximum length of a String based parameter
	//
	// @Optional
	MaxLength int `json:"MaxLength,omitempty"`

	// MaxValue defines the largest numeric value for a Number based parameter
	//
	// @Optional
	MaxValue float64 `json:"MaxValue,omitempty"`

	// MinLength defines the minimum length of a String based parameter
	//
	// @Optional
	MinLength int `json:"MinLength,omitempty"`

	// MinValue defines the smallest numeric value for a Number based parameter
	//
	// @Optional
	MinValue float64 `json:"MinValue,omitempty"`

	// NoEcho controls whether the value will be masked in the console, CLI or API
	// output for this parameter. CloudFormation will return the parameter value masked
	// with asterisks (*****). This should not be used as an approach for storing
	// sensitive information within a CloudFormation template, see:
	// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html#parameters-section-structure-properties
	//
	// @Optional
	NoEcho bool `json:"NoEcho,omitempty"`

	// Type defines the underlying data type of the parameter
	Type ParameterType `json:"Type"`
}

Parameter allows for a custom input value to be used within a CloudFormation template for every create or update of a stack, see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html

type ParameterType

type ParameterType string

ParameterType represents the data type of a given parameter

const (
	// String is a literal string
	String ParameterType = "String"

	// Number is an integer or float value
	Number ParameterType = "Number"

	// NumberList is an array of integer or float values
	NumberList ParameterType = "List<Number>"

	// CommaDelimitedList is an array of literal strings that are separated by commas
	CommaDelimitedList ParameterType = "CommaDelimitedList"

	// AvailabilityZone is an AWS availability zone with the expected format of 'eu-west-1'
	AvailabilityZone ParameterType = "AWS::EC2::AvailabilityZone::Name"

	// AvailabilityZoneList is an array of AWS availability zones separated by commas
	AvailabilityZoneList ParameterType = "List<AWS::EC2::AvailabilityZone::Name>"

	// EC2ImageID is an AWS EC2 image ID with the expected format of 'ami-0ff8a91507f77f867'
	EC2ImageID ParameterType = "AWS::EC2::Image::Id"

	// EC2ImageIDList is an array of AWS EC2 image IDs separated by commas
	EC2ImageIDList ParameterType = "List<AWS::EC2::Image::Id>"

	// EC2InstanceID is an AWS EC2 instance ID with the expected format of 'i-1e731a32'
	EC2InstanceID ParameterType = "AWS::EC2::Instance::Id"

	// EC2InstanceIDList is an array of AWS EC2 instanced IDs separated by commas
	EC2InstanceIDList ParameterType = "List<AWS::EC2::Instance::Id>"

	// KeyPairName is a name of an AWS EC2 key pair
	KeyPairName ParameterType = "AWS::EC2::KeyPair::KeyName"

	// KeyPairNameList is an array of AWS EC2 key pair names separated by commas
	KeyPairNameList ParameterType = "List<AWS::EC2::KeyPair::KeyName>"

	// SecurityGroupName is the name of an EC2-Classic or default VPC security group with the expected
	// format of 'my-sg-abc'
	SecurityGroupName ParameterType = "AWS::EC2::SecurityGroup::GroupName"

	// SecurityGroupNameList is an array of EC2-Classic of default VPC security group names separated by commas
	SecurityGroupNameList ParameterType = "List<AWS::EC2::SecurityGroup::GroupName>"

	// SecurityGroupID is an AWS EC2 security group ID with the expected format of 'sg-a123fd85'
	SecurityGroupID ParameterType = "AWS::EC2::SecurityGroup::Id"

	// SecurityGroupIDList is an array of EC2 security group IDs separated by commas
	SecurityGroupIDList ParameterType = "List<AWS::EC2::SecurityGroup::Id>"

	// SubnetID is an AWS VPC subnet ID with the expected format of 'subnet-123a351e'
	SubnetID ParameterType = "AWS::EC2::Subnet::Id"

	// SubnetIDList is an array of AWS VPC subnet IDs separated by commas
	SubnetIDList ParameterType = "List<AWS::EC2::Subnet::Id>"

	// EBSVolumeID is an EC2 EBS volume ID with the expected format of 'vol-3cdd3f56'
	EBSVolumeID ParameterType = "AWS::EC2::Volume::Id"

	// EBSVolumeIDList is an array of EC2 EBS volume IDs separted by commas
	EBSVolumeIDList ParameterType = "List<AWS::EC2::Volume::Id>"

	// VPCID is an AWS VPC ID with the expected format of 'vpc-b456baa3'
	VPCID ParameterType = "AWS::EC2::VPC::Id"

	// VPCIDList is an array of AWS VPC IDs separated by commas
	VPCIDList ParameterType = "List<AWS::EC2::VPC::Id>"

	// R53HostedZoneID is an AWS Route53 hosted zone ID with the expected format of 'Z23YXV4OVPL04A'
	R53HostedZoneID ParameterType = "AWS::Route53::HostedZone::Id"

	// R53HostedZoneIDList is an array of AWS Route53 hosted zone IDs separated by commas
	R53HostedZoneIDList ParameterType = "List<AWS::Route53::HostedZone::Id>"
)

type Policy

type Policy string

Policy defines how CloudFormation will handle resources and their contents during either stack deletion or resource replacement

type ResourceSignalCreationPolicy

type ResourceSignalCreationPolicy struct {
	// Count defines the number of success signals that must be received before
	// creation of the resource is deemed as successful, see:
	// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-creationpolicy.html#cfn-attributes-creationpolicy-resourcesignal-count
	//
	// @Optional
	Count int `json:"Count,omitempty"`

	// Timeout is the length of time that CloudFormation will wait until it has received
	// all of the expected resource signals, during the creation of the resource. Any
	// provided value must be in the ISO8601 duration format: https://en.wikipedia.org/wiki/ISO_8601#Durations,
	// see:
	// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-creationpolicy.html#cfn-attributes-creationpolicy-resourcesignal-timeout
	//
	// @Optional
	Timeout string `json:"Timeout,omitempty"`
}

ResourceSignalCreationPolicy configures the number of required success signals and the length of time that CloudFormation waits for those signals during the creation of a resource, see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-creationpolicy.html#cfn-attributes-creationpolicy-resourcesignal

type SecretsManagerKey added in v0.10.0

type SecretsManagerKey struct {
	// ID defines the name or ARN of the secret within AWS Secrets Manager. Cross account
	// access is supported, by providing the complete ARN of the secret in the target
	// account
	ID string

	// JSONKey defines the name of the JSON key-value pair whose value you want to retrieve
	// from the secret. If no key is provided, then the entire secret text is retrieved
	JSONKey string

	// VersionStage provides the staging label of the secret to retrieve. Secrets Manager uses
	// staging labels to keep track of different versions during the rotation process. Both
	// version stage and version ID cannot be specified together. If no version stage is provided,
	// the AWSCURRENT version will be retrieved by default
	VersionStage string

	// VersionID provides the unique identifier of the version of the secret to retrieve. Both version
	// ID and version stage cannot be specified together. If no version ID is provided, the
	// AWSCURRENT version will be retrieved by default
	VersionID string
}

SecretManagerKey defines a key for retrieving a secret from AWS Secrets Manager https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html#dynamic-references-secretsmanager

type StartFleetCreationPolicy

type StartFleetCreationPolicy struct {
	// Type is a flag identifying whether the fleet should be started or not, see:
	// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-creationpolicy.html#cfn-attributes-updatepolicy-replacingupdate-StartFleet
	//
	// @Optional
	Type bool `json:"Type,omitempty"`
}

StartFleetCreationPolicy configures the policy for starting an AWS AppStream 2.0 fleet upon creation, see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-creationpolicy.html

type Tag

type Tag struct {
	// Key contains the unique identifier associated with the tag, see:
	// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html#cfn-resource-tags-key
	Key string `json:"Key"`

	// Value contains the corresponding value associated with the tag, see:
	// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html#cfn-resource-tags-value
	Value string `json:"Value"`
}

Tag a resource with a custom identifier to help categorise and identify those resources, see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html

type Template

type Template struct {
	// AWSTemplateFormatVersion is used to identify the capabilities of a template within AWS, see:
	// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/format-version-structure.html
	//
	// @Optional
	AWSTemplateFormatVersion string `json:"AWSTemplateFormatVersion,omitempty"`

	// Description can be used to provide an optional comment about a CloudFormation template. The
	// description must be a string and between 0 and 1024 bytes in length. You cannot use a parameter
	// or intrinsic function to specify a description
	// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-description-structure.html
	//
	// @Optional
	Description string `json:"Description,omitempty"`

	// Parameters are used to input custom values into your template each time you create or
	// update a CloudFormation stack, see:
	// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html
	//
	// @Optional
	Parameters []Parameter `json:"Parameters,omitempty"`

	// Mappings are used to generate sets of key named values that can be referenced within a
	// CloudFormation template through the use of the Fn::FindInMap intrinsic function, see:
	// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/mappings-section-structure.html
	//
	// @Optional
	Mappings map[string]KeyedMapping `json:"Mappings,omitempty"`

	// Resources declare the AWS resources that are to be managed by this AWS CloudFormation stack, see:
	// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resources-section-structure.html
	Resources map[string]interface{} `json:"Resources"`

	// Outputs are used to declare output values that can be imported into other stacks or returned
	// as part of the response when describing available stacks, see:
	// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/outputs-section-structure.html
	//
	// @Optional
	Outputs map[string]Output `json:"Outputs,omitempty"`
}

Template provides a way to describe your AWS infrastructure through the use of CloudFormation JSON or YAML formatted documents, see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html

func (*Template) JSON added in v0.9.0

func (t *Template) JSON() ([]byte, error)

JSON utility method for serialising the current template into JSON

func (*Template) YAML added in v0.9.0

func (t *Template) YAML() ([]byte, error)

YAML utility method for serialising the current template into YAML. To ensure consistent results, a conversion from JSON to YAML is carried out rather than a dedicated YAML serialisation. Doing so can result in some unexpected results. Conversion between types guarantees compatibility between the two formats

type UseOnlineReshardingUpdatePolicy

type UseOnlineReshardingUpdatePolicy struct {
	// UseOnlineResharding specifies whether a replication group should add or
	// remove shards, rather than replacing the entire replication group, see:
	// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-useonlineresharding
	UseOnlineResharding bool `json:"UseOnlineResharding,omitempty"`
}

UseOnlineReshardingUpdatePolicy configures a policy for how CloudFormation manages the update of shards within an ElasticCache replication group, see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-useonlineresharding

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL