Documentation ¶
Index ¶
- Constants
- func DNSDelegatedAccountsForStack(stack *cloudformation.Stack) []string
- func NameForApp(project, env, app string) string
- func NameForEnv(project, env string) string
- func NewPipelineStackConfig(in *deploy.CreatePipelineInput) *pipelineStackConfig
- func ToProjectRegionalResources(stack *cloudformation.Stack) (*archer.ProjectRegionalResources, error)
- type BackendApp
- type DeployedProjectMetadata
- type EnvStackConfig
- func (e *EnvStackConfig) Parameters() []*cloudformation.Parameter
- func (e *EnvStackConfig) StackName() string
- func (e *EnvStackConfig) Tags() []*cloudformation.Tag
- func (e *EnvStackConfig) Template() (string, error)
- func (e *EnvStackConfig) ToEnv(stack *cloudformation.Stack) (*archer.Environment, error)
- type LoadBalancedWebApp
- type ProjectResourcesConfig
- type ProjectStackConfig
- func (c *ProjectStackConfig) Parameters() []*cloudformation.Parameter
- func (c *ProjectStackConfig) ResourceTemplate(config *ProjectResourcesConfig) (string, error)
- func (c *ProjectStackConfig) StackName() string
- func (c *ProjectStackConfig) StackSetAdminRoleARN() string
- func (c *ProjectStackConfig) StackSetDescription() string
- func (c *ProjectStackConfig) StackSetExecutionRoleName() string
- func (c *ProjectStackConfig) StackSetName() string
- func (c *ProjectStackConfig) Tags() []*cloudformation.Tag
- func (c *ProjectStackConfig) Template() (string, error)
- type RuntimeConfig
Constants ¶
const ( AppProjectNameParamKey = "ProjectName" AppEnvNameParamKey = "EnvName" AppNameParamKey = "AppName" AppContainerImageParamKey = "ContainerImage" AppTaskCPUParamKey = "TaskCPU" AppTaskMemoryParamKey = "TaskMemory" AppTaskCountParamKey = "TaskCount" AppLogRetentionParamKey = "LogRetention" AppAddonsTemplateURLParamKey = "AddonsTemplateURL" )
Parameter logical IDs common across applications.
const ( EnvOutputCFNExecutionRoleARN = "CFNExecutionRoleARN" EnvOutputManagerRoleKey = "EnvironmentManagerRoleARN" EnvOutputPublicLoadBalancerDNSName = "PublicLoadBalancerDNSName" EnvOutputSubdomain = "EnvironmentSubdomain" )
Output keys.
const ( LBWebAppHTTPSParamKey = "HTTPSEnabled" LBWebAppContainerPortParamKey = "ContainerPort" LBWebAppRulePathParamKey = "RulePath" LBWebAppHealthCheckPathParamKey = "HealthCheckPath" )
Parameter logical IDs for a load balanced web application.
const ( ProjectTagKey = "ecs-project" EnvTagKey = "ecs-environment" AppTagKey = "ecs-application" )
Tag keys used while creating stacks.
const (
BackendAppContainerPortParamKey = "ContainerPort"
)
Parameter logical IDs for a backend application.
const (
// EnvTemplatePath is the path where the cloudformation for the environment is written.
EnvTemplatePath = "environment/cf.yml"
)
Variables ¶
This section is empty.
Functions ¶
func DNSDelegatedAccountsForStack ¶
func DNSDelegatedAccountsForStack(stack *cloudformation.Stack) []string
DNSDelegatedAccountsForStack looks through a stack's parameters for the parameter which stores the comma seperated list of account IDs which are permitted for DNS delegation.
func NameForApp ¶
NameForApp returns the stack name for an application.
func NameForEnv ¶
NameForEnv returns the stack name for an environment.
func NewPipelineStackConfig ¶
func NewPipelineStackConfig(in *deploy.CreatePipelineInput) *pipelineStackConfig
func ToProjectRegionalResources ¶
func ToProjectRegionalResources(stack *cloudformation.Stack) (*archer.ProjectRegionalResources, error)
ToProjectRegionalResources takes a Project Resource Stack Instance stack, reads the output resources and returns a modeled ProjectRegionalResources.
Types ¶
type BackendApp ¶ added in v0.0.8
type BackendApp struct {
// contains filtered or unexported fields
}
BackendApp represents the configuration needed to create a CloudFormation stack from a backend application manifest.
func NewBackendApp ¶ added in v0.0.8
func NewBackendApp(mft *manifest.BackendApp, env, proj string, rc RuntimeConfig) (*BackendApp, error)
NewBackendApp creates a new BackendApp stack from a manifest file.
func (*BackendApp) Parameters ¶ added in v0.0.8
func (a *BackendApp) Parameters() []*cloudformation.Parameter
Parameters returns the list of CloudFormation parameters used by the template.
func (*BackendApp) SerializedParameters ¶ added in v0.0.8
func (a *BackendApp) SerializedParameters() (string, error)
SerializedParameters returns the CloudFormation stack's parameters serialized to a YAML document annotated with comments for readability to users.
func (BackendApp) StackName ¶ added in v0.0.8
func (a BackendApp) StackName() string
StackName returns the name of the stack.
func (BackendApp) Tags ¶ added in v0.0.8
func (a BackendApp) Tags() []*cloudformation.Tag
Tags returns the list of tags to apply to the CloudFormation stack.
func (*BackendApp) Template ¶ added in v0.0.8
func (a *BackendApp) Template() (string, error)
Template returns the CloudFormation template for the backend application.
type DeployedProjectMetadata ¶
type DeployedProjectMetadata struct {
Metadata ProjectResourcesConfig `yaml:"Metadata"`
}
DeployedProjectMetadata wraps the Metadata field of a deployed project StackSet.
type EnvStackConfig ¶
type EnvStackConfig struct { *deploy.CreateEnvironmentInput // contains filtered or unexported fields }
EnvStackConfig is for providing all the values to set up an environment stack and to interpret the outputs from it.
func NewEnvStackConfig ¶
func NewEnvStackConfig(input *deploy.CreateEnvironmentInput) *EnvStackConfig
NewEnvStackConfig sets up a struct which can provide values to CloudFormation for spinning up an environment.
func (*EnvStackConfig) Parameters ¶
func (e *EnvStackConfig) Parameters() []*cloudformation.Parameter
Parameters returns the parameters to be passed into a environment CloudFormation template.
func (*EnvStackConfig) StackName ¶
func (e *EnvStackConfig) StackName() string
StackName returns the name of the CloudFormation stack (based on the project and env names).
func (*EnvStackConfig) Tags ¶
func (e *EnvStackConfig) Tags() []*cloudformation.Tag
Tags returns the tags that should be applied to the environment CloudFormation stack.
func (*EnvStackConfig) Template ¶
func (e *EnvStackConfig) Template() (string, error)
Template returns the environment CloudFormation template.
func (*EnvStackConfig) ToEnv ¶
func (e *EnvStackConfig) ToEnv(stack *cloudformation.Stack) (*archer.Environment, error)
ToEnv inspects an environment cloudformation stack and constructs an environment struct out of it (including resources like ECR Repo)
type LoadBalancedWebApp ¶ added in v0.0.8
type LoadBalancedWebApp struct {
// contains filtered or unexported fields
}
LoadBalancedWebApp represents the configuration needed to create a CloudFormation stack from a load balanced web application manifest.
func NewHTTPSLoadBalancedWebApp ¶ added in v0.0.8
func NewHTTPSLoadBalancedWebApp(mft *manifest.LoadBalancedWebApp, env, proj string, rc RuntimeConfig) (*LoadBalancedWebApp, error)
NewHTTPSLoadBalancedWebApp creates a new LoadBalancedWebApp stack from its manifest that needs to be deployed to a environment within a project. It creates an HTTPS listener and assumes that the environment it's being deployed into has an HTTPS configured listener.
func NewLoadBalancedWebApp ¶ added in v0.0.8
func NewLoadBalancedWebApp(mft *manifest.LoadBalancedWebApp, env, proj string, rc RuntimeConfig) (*LoadBalancedWebApp, error)
NewLoadBalancedWebApp creates a new LoadBalancedWebApp stack from a manifest file.
func (*LoadBalancedWebApp) Parameters ¶ added in v0.0.8
func (c *LoadBalancedWebApp) Parameters() []*cloudformation.Parameter
Parameters returns the list of CloudFormation parameters used by the template.
func (*LoadBalancedWebApp) SerializedParameters ¶ added in v0.0.8
func (c *LoadBalancedWebApp) SerializedParameters() (string, error)
SerializedParameters returns the CloudFormation stack's parameters serialized to a YAML document annotated with comments for readability to users.
func (LoadBalancedWebApp) StackName ¶ added in v0.0.8
func (a LoadBalancedWebApp) StackName() string
StackName returns the name of the stack.
func (LoadBalancedWebApp) Tags ¶ added in v0.0.8
func (a LoadBalancedWebApp) Tags() []*cloudformation.Tag
Tags returns the list of tags to apply to the CloudFormation stack.
func (*LoadBalancedWebApp) Template ¶ added in v0.0.8
func (c *LoadBalancedWebApp) Template() (string, error)
Template returns the CloudFormation template for the application parametrized for the environment.
type ProjectResourcesConfig ¶
type ProjectResourcesConfig struct { Accounts []string `yaml:"Accounts,flow"` Apps []string `yaml:"Apps,flow"` Project string `yaml:"Project"` Version int `yaml:"Version"` }
ProjectResourcesConfig is a configuration for a deployed Project StackSet.
func ProjectConfigFrom ¶
func ProjectConfigFrom(template *string) (*ProjectResourcesConfig, error)
ProjectConfigFrom takes a template file and extracts the metadata block, and parses it into a projectStackConfig
type ProjectStackConfig ¶
type ProjectStackConfig struct { *deploy.CreateProjectInput // contains filtered or unexported fields }
ProjectStackConfig is for providing all the values to set up an environment stack and to interpret the outputs from it.
func NewProjectStackConfig ¶
func NewProjectStackConfig(in *deploy.CreateProjectInput) *ProjectStackConfig
NewProjectStackConfig sets up a struct which can provide values to CloudFormation for spinning up an environment.
func (*ProjectStackConfig) Parameters ¶
func (c *ProjectStackConfig) Parameters() []*cloudformation.Parameter
Parameters returns the parameters to be passed into a environment CloudFormation template.
func (*ProjectStackConfig) ResourceTemplate ¶
func (c *ProjectStackConfig) ResourceTemplate(config *ProjectResourcesConfig) (string, error)
ResourceTemplate generates a StackSet template with all the Project-wide resources (ECR Repos, KMS keys, S3 buckets)
func (*ProjectStackConfig) StackName ¶
func (c *ProjectStackConfig) StackName() string
StackName returns the name of the CloudFormation stack (based on the project name).
func (*ProjectStackConfig) StackSetAdminRoleARN ¶
func (c *ProjectStackConfig) StackSetAdminRoleARN() string
StackSetAdminRoleARN returns the role ARN of the role used to administer the Project StackSet.
func (*ProjectStackConfig) StackSetDescription ¶
func (c *ProjectStackConfig) StackSetDescription() string
StackSetDescription returns the description of the StackSet for project resources.
func (*ProjectStackConfig) StackSetExecutionRoleName ¶
func (c *ProjectStackConfig) StackSetExecutionRoleName() string
StackSetExecutionRoleName returns the role name of the role used to actually create Project resources.
func (*ProjectStackConfig) StackSetName ¶
func (c *ProjectStackConfig) StackSetName() string
StackSetName returns the name of the CloudFormation StackSet (based on the project name).
func (*ProjectStackConfig) Tags ¶
func (c *ProjectStackConfig) Tags() []*cloudformation.Tag
Tags returns the tags that should be applied to the project CloudFormation stack.
func (*ProjectStackConfig) Template ¶
func (c *ProjectStackConfig) Template() (string, error)
Template returns the environment CloudFormation template.
type RuntimeConfig ¶ added in v0.0.8
type RuntimeConfig struct { ImageRepoURL string // ImageRepoURL is the ECR repository URL the container image should be pushed to. ImageTag string // ImageTag is the container image's unique tag. AddonsTemplateURL string // Optional. S3 object URL for the addons template. AdditionalTags map[string]string // AdditionalTags are labels applied to resources in the application stack. }
RuntimeConfig represents configuration that's defined outside of the manifest file that is needed to create a CloudFormation stack.