Documentation ¶
Index ¶
- Constants
- func DNSDelegatedAccountsForStack(stack *cloudformation.Stack) []string
- func NameForAppStack(app string) string
- func NameForAppStackSet(app string) string
- func NameForEnv(app, env string) string
- func NameForService(app, env, svc string) string
- func NewPipelineStackConfig(in *deploy.CreatePipelineInput) *pipelineStackConfig
- func NewTaskStackConfig(taskOpts *deploy.CreateTaskResourcesInput) *taskStackConfig
- type AppRegionalResources
- type AppResourcesConfig
- type AppStackConfig
- func (c *AppStackConfig) Parameters() ([]*cloudformation.Parameter, error)
- func (c *AppStackConfig) ResourceTemplate(config *AppResourcesConfig) (string, error)
- func (c *AppStackConfig) StackName() string
- func (c *AppStackConfig) StackSetAdminRoleARN(region string) (string, error)
- func (c *AppStackConfig) StackSetDescription() string
- func (c *AppStackConfig) StackSetExecutionRoleName() string
- func (c *AppStackConfig) StackSetName() string
- func (c *AppStackConfig) Tags() []*cloudformation.Tag
- func (c *AppStackConfig) Template() (string, error)
- type BackendService
- type DeployedAppMetadata
- type ECRImage
- type EnvStackConfig
- func (e *EnvStackConfig) Parameters() ([]*cloudformation.Parameter, error)
- func (e *EnvStackConfig) StackName() string
- func (e *EnvStackConfig) Tags() []*cloudformation.Tag
- func (e *EnvStackConfig) Template() (string, error)
- func (e *EnvStackConfig) ToEnv(stack *cloudformation.Stack) (*config.Environment, error)
- type LoadBalancedWebService
- type RequestDrivenWebService
- func NewRequestDrivenWebService(mft *manifest.RequestDrivenWebService, env string, app deploy.AppInformation, ...) (*RequestDrivenWebService, error)
- func NewRequestDrivenWebServiceWithAlias(mft *manifest.RequestDrivenWebService, env string, app deploy.AppInformation, ...) (*RequestDrivenWebService, error)
- type RuntimeConfig
- type ScheduledJob
- type TaskStackName
- type WorkerService
Constants ¶
const ( EnvParamAliasesKey = "Aliases" // Output keys. EnvOutputVPCID = "VpcId" EnvOutputPublicSubnets = "PublicSubnets" EnvOutputPrivateSubnets = "PrivateSubnets" EnvParamServiceDiscoveryEndpoint = "ServiceDiscoveryEndpoint" // Default parameter values DefaultVPCCIDR = "10.0.0.0/16" DefaultPublicSubnetCIDRs = "10.0.0.0/24,10.0.1.0/24" DefaultPrivateSubnetCIDRs = "10.0.2.0/24,10.0.3.0/24" )
const ( LBWebServiceHTTPSParamKey = "HTTPSEnabled" LBWebServiceContainerPortParamKey = "ContainerPort" LBWebServiceRulePathParamKey = "RulePath" LBWebServiceTargetContainerParamKey = "TargetContainer" LBWebServiceTargetPortParamKey = "TargetPort" LBWebServiceStickinessParamKey = "Stickiness" )
Parameter logical IDs for a load balanced web service.
const ( WorkloadAppNameParamKey = "AppName" WorkloadEnvNameParamKey = "EnvName" WorkloadNameParamKey = "WorkloadName" WorkloadContainerImageParamKey = "ContainerImage" WorkloadContainerPortParamKey = "ContainerPort" WorkloadAddonsTemplateURLParamKey = "AddonsTemplateURL" )
Parameter logical IDs common across workloads.
const ( WorkloadTaskCPUParamKey = "TaskCPU" WorkloadTaskMemoryParamKey = "TaskMemory" WorkloadTaskCountParamKey = "TaskCount" WorkloadLogRetentionParamKey = "LogRetention" )
Parameter logical IDs for workloads on ECS.
const ( RDWkldImageRepositoryType = "ImageRepositoryType" RDWkldInstanceCPUParamKey = "InstanceCPU" RDWkldInstanceMemoryParamKey = "InstanceMemory" RDWkldInstanceRoleParamKey = "InstanceRole" RDWkldHealthCheckPathParamKey = "HealthCheckPath" RDWkldHealthCheckIntervalParamKey = "HealthCheckInterval" RDWkldHealthCheckTimeoutParamKey = "HealthCheckTimeout" RDWkldHealthCheckHealthyThresholdParamKey = "HealthCheckHealthyThreshold" RDWkldHealthCheckUnhealthyThresholdParamKey = "HealthCheckUnhealthyThreshold" )
Parameter logical IDs for workloads on App Runner.
const (
BackendServiceContainerPortParamKey = "ContainerPort"
)
Parameter logical IDs for a backend service.
const (
// NoExposedContainerPort indicates no port should be exposed for the service container.
NoExposedContainerPort = "-1"
)
const (
ScheduledJobScheduleParamKey = "Schedule"
)
Parameter logical IDs for a scheduled job
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 NameForAppStack ¶ added in v1.5.0
NameForAppStack returns the stack name for an app.
func NameForAppStackSet ¶ added in v1.5.0
NameForAppStackSet returns the stackset name for an app.
func NameForEnv ¶
NameForEnv returns the stack name for an environment.
func NameForService ¶
NameForService returns the stack name for a service.
func NewPipelineStackConfig ¶
func NewPipelineStackConfig(in *deploy.CreatePipelineInput) *pipelineStackConfig
func NewTaskStackConfig ¶
func NewTaskStackConfig(taskOpts *deploy.CreateTaskResourcesInput) *taskStackConfig
NewTaskStackConfig sets up a struct that provides stack configurations for CloudFormation to deploy the task resources stack.
Types ¶
type AppRegionalResources ¶
type AppRegionalResources struct { Region string // The region these resources are in. KMSKeyARN string // A KMS Key ARN for encrypting Pipeline artifacts. S3Bucket string // S3 bucket for Pipeline artifacts. RepositoryURLs map[string]string // The image repository URLs by service name. }
AppRegionalResources represent application resources that are regional.
func ToAppRegionalResources ¶
func ToAppRegionalResources(stack *cloudformation.Stack) (*AppRegionalResources, error)
ToAppRegionalResources takes an Application Resource Stack Instance stack, reads the output resources and returns a modeled ProjectRegionalResources.
type AppResourcesConfig ¶
type AppResourcesConfig struct { Accounts []string `yaml:"Accounts,flow"` Services []string `yaml:"Services,flow"` App string `yaml:"App"` Version int `yaml:"Version"` }
AppResourcesConfig is a configuration for a deployed Application StackSet.
func AppConfigFrom ¶
func AppConfigFrom(template *string) (*AppResourcesConfig, error)
AppConfigFrom takes a template file and extracts the metadata block, and parses it into an AppStackConfig
type AppStackConfig ¶
type AppStackConfig struct { *deploy.CreateAppInput // contains filtered or unexported fields }
AppStackConfig is for providing all the values to set up an environment stack and to interpret the outputs from it.
func NewAppStackConfig ¶
func NewAppStackConfig(in *deploy.CreateAppInput) *AppStackConfig
NewAppStackConfig sets up a struct which can provide values to CloudFormation for spinning up an environment.
func (*AppStackConfig) Parameters ¶
func (c *AppStackConfig) Parameters() ([]*cloudformation.Parameter, error)
Parameters returns a list of parameters which accompany the app CloudFormation template.
func (*AppStackConfig) ResourceTemplate ¶
func (c *AppStackConfig) ResourceTemplate(config *AppResourcesConfig) (string, error)
ResourceTemplate generates a StackSet template with all the Application-wide resources (ECR Repos, KMS keys, S3 buckets)
func (*AppStackConfig) StackName ¶
func (c *AppStackConfig) StackName() string
StackName returns the name of the CloudFormation stack (based on the application name).
func (*AppStackConfig) StackSetAdminRoleARN ¶
func (c *AppStackConfig) StackSetAdminRoleARN(region string) (string, error)
StackSetAdminRoleARN returns the role ARN of the role used to administer the Application StackSet.
func (*AppStackConfig) StackSetDescription ¶
func (c *AppStackConfig) StackSetDescription() string
StackSetDescription returns the description of the StackSet for application resources.
func (*AppStackConfig) StackSetExecutionRoleName ¶
func (c *AppStackConfig) StackSetExecutionRoleName() string
StackSetExecutionRoleName returns the role name of the role used to actually create Application resources.
func (*AppStackConfig) StackSetName ¶
func (c *AppStackConfig) StackSetName() string
StackSetName returns the name of the CloudFormation StackSet (based on the application name).
func (*AppStackConfig) Tags ¶
func (c *AppStackConfig) Tags() []*cloudformation.Tag
Tags returns the tags that should be applied to the Application CloudFormation stack.
func (*AppStackConfig) Template ¶
func (c *AppStackConfig) Template() (string, error)
Template returns the environment CloudFormation template.
type BackendService ¶
type BackendService struct {
// contains filtered or unexported fields
}
BackendService represents the configuration needed to create a CloudFormation stack from a backend service manifest.
func NewBackendService ¶
func NewBackendService(mft *manifest.BackendService, env, app string, rc RuntimeConfig) (*BackendService, error)
NewBackendService creates a new BackendService stack from a manifest file.
func (*BackendService) Parameters ¶
func (s *BackendService) Parameters() ([]*cloudformation.Parameter, error)
Parameters returns the list of CloudFormation parameters used by the template.
func (*BackendService) SerializedParameters ¶
func (s *BackendService) SerializedParameters() (string, error)
SerializedParameters returns the CloudFormation stack's parameters serialized to a YAML document annotated with comments for readability to users.
func (*BackendService) Template ¶
func (s *BackendService) Template() (string, error)
Template returns the CloudFormation template for the backend service.
type DeployedAppMetadata ¶
type DeployedAppMetadata struct {
Metadata AppResourcesConfig `yaml:"Metadata"`
}
DeployedAppMetadata wraps the Metadata field of a deployed application StackSet.
type ECRImage ¶ added in v0.5.0
type ECRImage struct { RepoURL string // RepoURL is the ECR repository URL the container image should be pushed to. ImageTag string // Tag is the container image's unique tag. Digest string // The image digest. }
ECRImage represents configuration about the pushed ECR image that is needed to create a CloudFormation stack.
func (ECRImage) GetLocation ¶ added in v0.5.0
GetLocation returns the ECR image URI. If a tag is provided by the user or discovered from git then prioritize referring to the image via the tag. Otherwise, each image after a push to ECR will get a digest and we refer to the image via the digest. Finally, if no digest or tag is present, this occurs with the "package" commands, we default to the "latest" tag.
type EnvStackConfig ¶
type EnvStackConfig struct {
// 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, error)
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 app 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) (*config.Environment, error)
ToEnv inspects an environment cloudformation stack and constructs an environment struct out of it (including resources like ECR Repo)
type LoadBalancedWebService ¶
type LoadBalancedWebService struct {
// contains filtered or unexported fields
}
LoadBalancedWebService represents the configuration needed to create a CloudFormation stack from a load balanced web service manifest.
func NewHTTPSLoadBalancedWebService ¶
func NewHTTPSLoadBalancedWebService(mft *manifest.LoadBalancedWebService, env, app string, rc RuntimeConfig) (*LoadBalancedWebService, error)
NewHTTPSLoadBalancedWebService creates a new LoadBalancedWebService stack from its manifest that needs to be deployed to a environment within an application. It creates an HTTPS listener and assumes that the environment it's being deployed into has an HTTPS configured listener.
func NewLoadBalancedWebService ¶
func NewLoadBalancedWebService(mft *manifest.LoadBalancedWebService, env, app string, rc RuntimeConfig) (*LoadBalancedWebService, error)
NewLoadBalancedWebService creates a new LoadBalancedWebService stack from a manifest file.
func (*LoadBalancedWebService) Parameters ¶
func (s *LoadBalancedWebService) Parameters() ([]*cloudformation.Parameter, error)
Parameters returns the list of CloudFormation parameters used by the template.
func (*LoadBalancedWebService) SerializedParameters ¶
func (s *LoadBalancedWebService) SerializedParameters() (string, error)
SerializedParameters returns the CloudFormation stack's parameters serialized to a YAML document annotated with comments for readability to users.
func (*LoadBalancedWebService) Template ¶
func (s *LoadBalancedWebService) Template() (string, error)
Template returns the CloudFormation template for the service parametrized for the environment.
type RequestDrivenWebService ¶ added in v1.7.0
type RequestDrivenWebService struct {
// contains filtered or unexported fields
}
RequestDrivenWebService represents the configuration needed to create a CloudFormation stack from a request-drive web service manifest.
func NewRequestDrivenWebService ¶ added in v1.7.0
func NewRequestDrivenWebService(mft *manifest.RequestDrivenWebService, env string, app deploy.AppInformation, rc RuntimeConfig) (*RequestDrivenWebService, error)
NewRequestDrivenWebService creates a new RequestDrivenWebService stack from a manifest file.
func NewRequestDrivenWebServiceWithAlias ¶ added in v1.9.0
func NewRequestDrivenWebServiceWithAlias(mft *manifest.RequestDrivenWebService, env string, app deploy.AppInformation, rc RuntimeConfig, urls map[string]string) (*RequestDrivenWebService, error)
NewRequestDrivenWebServiceWithAlias creates a new RequestDrivenWebService stack from a manifest file. It creates custom resources needed for alias with scripts accessible from the urls.
func (RequestDrivenWebService) Parameters ¶ added in v1.7.0
func (w RequestDrivenWebService) Parameters() ([]*cloudformation.Parameter, error)
Parameters returns the list of CloudFormation parameters used by the template.
func (*RequestDrivenWebService) SerializedParameters ¶ added in v1.7.0
func (s *RequestDrivenWebService) SerializedParameters() (string, error)
SerializedParameters returns the CloudFormation stack's parameters serialized to a YAML document annotated with comments for readability to users.
func (*RequestDrivenWebService) Template ¶ added in v1.7.0
func (s *RequestDrivenWebService) Template() (string, error)
Template returns the CloudFormation template for the service parametrized for the environment.
type RuntimeConfig ¶
type RuntimeConfig struct { Image *ECRImage // Optional. Image location in an ECR repository. AddonsTemplateURL string // Optional. S3 object URL for the addons template. AdditionalTags map[string]string // AdditionalTags are labels applied to resources in the workload stack. ServiceDiscoveryEndpoint string // Endpoint for the service discovery namespace in the environment. AccountID string // Account ID for constructing ARNs Region string // Region for constructing ARNs }
RuntimeConfig represents configuration that's defined outside of the manifest file that is needed to create a CloudFormation stack.
type ScheduledJob ¶ added in v0.5.0
type ScheduledJob struct {
// contains filtered or unexported fields
}
ScheduledJob represents the configuration needed to create a Cloudformation stack from a scheduled job manfiest.
func NewScheduledJob ¶ added in v0.5.0
func NewScheduledJob(mft *manifest.ScheduledJob, env, app string, rc RuntimeConfig) (*ScheduledJob, error)
NewScheduledJob creates a new ScheduledJob stack from a manifest file.
func (*ScheduledJob) Parameters ¶ added in v0.5.0
func (j *ScheduledJob) Parameters() ([]*cloudformation.Parameter, error)
Parameters returns the list of CloudFormation parameters used by the template.
func (*ScheduledJob) SerializedParameters ¶ added in v0.5.0
func (j *ScheduledJob) SerializedParameters() (string, error)
SerializedParameters returns the CloudFormation stack's parameters serialized to a YAML document annotated with comments for readability.
func (*ScheduledJob) Template ¶ added in v0.5.0
func (j *ScheduledJob) Template() (string, error)
Template returns the CloudFormation template for the scheduled job.
type TaskStackName ¶ added in v1.1.0
type TaskStackName string
TaskStackName holds the name of a Copilot one-off task stack.
func NameForTask ¶
func NameForTask(task string) TaskStackName
NameForTask returns the stack name for a task.
func (TaskStackName) TaskName ¶ added in v1.1.0
func (t TaskStackName) TaskName() string
TaskName returns the name of the task family, generated from the stack name
type WorkerService ¶ added in v1.10.0
type WorkerService struct {
// contains filtered or unexported fields
}
WorkerService represents the configuration needed to create a CloudFormation stack from a worker service manifest.
func NewWorkerService ¶ added in v1.10.0
func NewWorkerService(mft *manifest.WorkerService, env, app string, rc RuntimeConfig) (*WorkerService, error)
NewWorkerService creates a new WorkerService stack from a manifest file.
func (*WorkerService) Parameters ¶ added in v1.10.0
func (s *WorkerService) Parameters() ([]*cloudformation.Parameter, error)
Parameters returns the list of CloudFormation parameters used by the template.
func (*WorkerService) SerializedParameters ¶ added in v1.10.0
func (s *WorkerService) SerializedParameters() (string, error)
SerializedParameters returns the CloudFormation stack's parameters serialized to a YAML document annotated with comments for readability to users.
func (*WorkerService) Template ¶ added in v1.10.0
func (s *WorkerService) Template() (string, error)
Template returns the CloudFormation template for the worker service.