Documentation ¶
Index ¶
Constants ¶
const ( // NorthVirginiaSpec CloudFormation specification URL for AWS region (us-east-1) NorthVirginiaSpec = "https://d1uauaxba7bl26.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json" // OhioSpec CloudFormation specification URL for AWS region (us-east-2) OhioSpec = "https://dnwj8swjjbsbt.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json" // NorthCaliforniaSpec CloudFormation specification URL for AWS region (us-west-1) NorthCaliforniaSpec = "https://d68hl49wbnanq.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json" // OregonSpec CloudFormation specification URL for AWS region (us-west-2) OregonSpec = "https://d201a2mn26r7lk.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json" // GovCloudEastSpec CloudFormation specification URL for AWS region (us-gov-east-1) GovCloudEastSpec = "" /* 133-byte string literal not displayed */ // GovCloudWestSpec CloudFormation specification URL for AWS region (us-gov-west-1) GovCloudWestSpec = "" /* 133-byte string literal not displayed */ // CanadaSpec CloudFormation specification URL for AWS region (ca-central-1) CanadaSpec = "https://d2s8ygphhesbe7.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json" // SãoPauloSpec CloudFormation specification URL for AWS region (sa-east-1) SãoPauloSpec = "https://d3c9jyj3w509b0.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json" // IrelandSpec CloudFormation specification URL for AWS region (eu-west-1) IrelandSpec = "https://d3teyb21fexa9r.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json" // LondonSpec CloudFormation specification URL for AWS region (eu-west-2) LondonSpec = "https://d1742qcu2c1ncx.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json" // ParisSpec CloudFormation specification URL for AWS region (eu-west-3) ParisSpec = "https://d2d0mfegowb3wk.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json" // StockholmSpec CloudFormation specification URL for AWS region (eu-north-1) StockholmSpec = "https://diy8iv58sj6ba.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json" // FrankfurtSpec CloudFormation specification URL for AWS region (eu-central-1) FrankfurtSpec = "https://d1mta8qj7i28i2.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json" // MilanSpec CloudFormation specification URL for AWS region (eu-south-1) MilanSpec = "" /* 132-byte string literal not displayed */ // BahrainSpec CloudFormation specification URL for AWS region (me-south-1) BahrainSpec = "" /* 132-byte string literal not displayed */ // CapeTownSpec CloudFormation specification URL for AWS region (af-south-1) CapeTownSpec = "" /* 132-byte string literal not displayed */ // BeijingSpec CloudFormation specification URL for AWS region (cn-north-1) BeijingSpec = "" /* 135-byte string literal not displayed */ // NingxiaSpec CloudFormation specification URL for AWS region (cn-northwest-1) NingxiaSpec = "" /* 143-byte string literal not displayed */ // HongKongSpec CloudFormation specification URL for AWS region (ap-east-1) HongKongSpec = "" /* 130-byte string literal not displayed */ // TokyoSpec CloudFormation specification URL for AWS region (ap-northeast-1) TokyoSpec = "https://d33vqc0rt9ld30.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json" // SeoulSpec CloudFormation specification URL for AWS region (ap-northeast-2) SeoulSpec = "https://d1ane3fvebulky.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json" // OsakaSpec CloudFormation specification URL for AWS region (ap-northeast-3) OsakaSpec = "https://d2zq80gdmjim8k.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json" // MumbaiSpec CloudFormation specification URL for AWS region (ap-south-1) MumbaiSpec = "https://d2senuesg1djtx.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json" // SingaporeSpec CloudFormation specification URL for AWS region (ap-southeast-1) SingaporeSpec = "https://doigdx0kgq9el.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json" // SydneySpec CloudFormation specification URL for AWS region (ap-southeast-2) SydneySpec = "https://d2stg8d246z9di.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json" // JakartaSpec CloudFormation specification URL for AWS region (ap-southeast-3) JakartaSpec = "" /* 135-byte string literal not displayed */ )
Variables ¶
var ( // ResourceCreationPolicies defines a set of CloudFormation creation policies supported // by a subset of CloudFormation resources ResourceCreationPolicies = map[string]string{ "AWS::AppStream::Fleet": "*cfn.AppStreamCreationPolicy", "AWS::AutoScaling::AutoScalingGroup": "*cfn.AutoScalingCreationPolicy", "AWS::EC2::Instance": "*cfn.ResourceSignalCreationPolicy", "AWS::CloudFormation::WaitCondition": "*cfn.ResourceSignalCreationPolicy", } // ResourceUpdatePolicies defines a set of CloudFormation update policies supported // by a subset of CloudFormation resources ResourceUpdatePolicies = map[string]string{ "AWS::AppStream::Fleet": "*cfn.AppStreamUpdatePolicy", "AWS::AutoScaling::AutoScalingGroup": "*cfn.AutoScalingUpdatePolicy", "AWS::ElastiCache::ReplicationGroup": "*cfn.UseOnlineReshardingUpdatePolicy", "AWS::OpenSearchService::Domain": "*cfn.EnableVersionUpgradeUpdatePolicy", "AWS::Elasticsearch::Domain": "*cfn.EnableVersionUpgradeUpdatePolicy", "AWS::Lambda::Alias": "*cfn.CodeDeployLambdaAliasUpdatePolicy", } )
var PropertyTypeConflicts = map[string]string{
"AWS::EC2::SecurityGroup.Egress": "AWS::EC2::SecurityGroup.EgressRule",
"AWS::EC2::SecurityGroup.Ingress": "AWS::EC2::SecurityGroup.IngressRule",
"AWS::RDS::DBSecurityGroup.Ingress": "AWS::RDS::DBSecurityGroup.IngressRule",
"AWS::ElasticLoadBalancingV2::Listener.Certificate": "AWS::ElasticLoadBalancingV2::Listener.ServerCertificate",
"AWS::MediaConnect::Flow.Source": "AWS::MediaConnect::Flow.SourceConfig",
"AWS::ServiceDiscovery::PrivateDnsNamespace.Properties": "AWS::ServiceDiscovery::PrivateDnsNamespace.DnsProperties",
"AWS::ServiceDiscovery::PublicDnsNamespace.Properties": "AWS::ServiceDiscovery::PublicDnsNamespace.DnsProperties",
}
PropertyTypeConflicts defines a map of properties types that cause conflicts after code generation. A safe type resolution is provided for each. Any renaming shouldn't deviate from the original intention of the property
var ( // Regions defines a map of all supported AWS CloudFormation specification regions Regions = map[string]Region{ "us-east-1": { Name: "North Virginia", SpecURL: NorthVirginiaSpec, }, "us-east-2": { Name: "Ohio", SpecURL: OhioSpec, }, "us-west-1": { Name: "North California", SpecURL: NorthCaliforniaSpec, }, "us-west-2": { Name: "Oregon", SpecURL: OregonSpec, }, "us-gov-east-1": { Name: "Gov Cloud East", SpecURL: GovCloudEastSpec, }, "us-gov-west-1": { Name: "Gov Cloud West", SpecURL: GovCloudWestSpec, }, "ca-central-1": { Name: "Canada", SpecURL: CanadaSpec, }, "sa-east-1": { Name: "São Paulo", SpecURL: SãoPauloSpec, }, "eu-west-1": { Name: "Ireland", SpecURL: IrelandSpec, }, "eu-west-2": { Name: "London", SpecURL: LondonSpec, }, "eu-west-3": { Name: "Paris", SpecURL: ParisSpec, }, "eu-north-1": { Name: "Stockholm", SpecURL: StockholmSpec, }, "eu-central-1": { Name: "Frankfurt", SpecURL: FrankfurtSpec, }, "eu-south-1": { Name: "Milan", SpecURL: MilanSpec, }, "me-south-1": { Name: "Bahrain", SpecURL: BahrainSpec, }, "af-south-1": { Name: "Cape Town", SpecURL: CapeTownSpec, }, "cn-north-1": { Name: "Beijing", SpecURL: BeijingSpec, }, "cn-northwest-1": { Name: "Ningxia", SpecURL: NingxiaSpec, }, "ap-east-1": { Name: "Hong Kong", SpecURL: HongKongSpec, }, "ap-northeast-1": { Name: "Tokyo", SpecURL: TokyoSpec, }, "ap-northeast-2": { Name: "Seoul", SpecURL: SeoulSpec, }, "ap-northeast-3": { Name: "Osaka", SpecURL: OsakaSpec, }, "ap-south-1": { Name: "Mumbai", SpecURL: MumbaiSpec, }, "ap-southeast-1": { Name: "Singapore", SpecURL: SingaporeSpec, }, "ap-southeast-2": { Name: "Sydney", SpecURL: SydneySpec, }, "ap-southeast-3": { Name: "Jakarta", SpecURL: JakartaSpec, }, } )
var ResourceTypeConflicts = map[string]string{
"ResourceTypes.AWS::EC2::SecurityGroup.Properties.SecurityGroupEgress.ItemType": "EgressRule",
"ResourceTypes.AWS::EC2::SecurityGroup.Properties.SecurityGroupIngress.ItemType": "IngressRule",
"ResourceTypes.AWS::RDS::DBSecurityGroup.Properties.DBSecurityGroupIngress.ItemType": "IngressRule",
"ResourceTypes.AWS::ElasticLoadBalancingV2::Listener.Properties.Certificates.ItemType": "ServerCertificate",
"ResourceTypes.AWS::MediaConnect::Flow.Properties.Source.Type": "SourceConfig",
"ResourceTypes.AWS::ServiceDiscovery::PrivateDnsNamespace.Properties.Properties.Type": "DnsProperties",
"ResourceTypes.AWS::ServiceDiscovery::PublicDnsNamespace.Properties.Properties.Type": "DnsProperties",
}
ResourceTypeConflicts defines a map of resource types that cause conflicts after code generation. A safe type resolution is provided for each. Any renaming shouldn't deviate from the original intention of the resource
Functions ¶
This section is empty.
Types ¶
type Attribute ¶ added in v0.5.0
Attribute defines a value that can be retrieved from a resource using CloudFormation intrinsic functions
func (*Attribute) UnmarshalJSON ¶ added in v0.5.0
UnmarshalJSON is custom JSON unmarshaler that converts a CloudFormation Attribute definition into a format that is easier to process by a Go template
type CustomPolicy ¶
CustomPolicy defines a custom policy that can be attached to a CloudFormation resource
type Property ¶
type Property struct { CustomType bool Documentation string DuplicatesAllowed bool Required bool Type string UpdateType string }
Property contains details about a specific CloudFormation property
func (*Property) UnmarshalJSON ¶
UnmarshalJSON is custom JSON unmarshaler that converts a CloudFormation Property definition into a format that is easier to process by a Go template
type PropertyType ¶
type PropertyType struct { Name string Documentation string `json:"Documentation"` Properties map[string]Property `json:"Properties"` }
PropertyType contains details about a specific CloudFormation resources properties
type ResourceType ¶
type ResourceType struct { Documentation string Properties map[string]Property CreationPolicy string UpdatePolicy string Attributes map[string]Attribute }
ResourceType contains details about a specific CloudFormation resource
func (*ResourceType) UnmarshalJSON ¶ added in v0.6.0
func (r *ResourceType) UnmarshalJSON(data []byte) error
UnmarshalJSON is custom JSON unmarshaler that converts a CloudFormation Resource definition into a format that is easier to process by a Go template
type Specification ¶
type Specification struct { PropertyTypes map[string][]PropertyType `json:"PropertyTypes"` ResourceTypes map[string]ResourceType `json:"ResourceTypes"` Version string `json:"Version"` }
Specification defines all resources and properties that a specific version of AWS CloudFormation supports https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-resource-specification-format.html
func (*Specification) UnmarshalJSON ¶
func (s *Specification) UnmarshalJSON(data []byte) error
UnmarshalJSON is custom JSON unmarshaller that converts a CloudFormation Specification definition into a format that is easier to process by a Go template