Documentation ¶
Overview ¶
Package stack provides functionality to transform manifest files and additional runtime configuration into CloudFormation stacks.
Index ¶
- Constants
- Variables
- func DNSDelegatedAccountsForStack(stack *cloudformation.Stack) []string
- func NameForAppStack(app string) string
- func NameForAppStackSet(app string) string
- func NameForEnv(app, env string) string
- func NameForPipeline(app string, pipeline string, isLegacy bool) string
- func NameForWorkload(app, env, name string) string
- func NewPipelineStackConfig(in *deploy.CreatePipelineInput) *pipelineStackConfig
- func NewTaskStackConfig(taskOpts *deploy.CreateTaskResourcesInput) *taskStackConfig
- func WithNLB(cidrBlocks []string) func(s *LoadBalancedWebService)
- type Addons
- type AppRegionalResources
- type AppResources
- type AppResourcesConfig
- type AppResourcesWorkload
- type AppStackConfig
- func (c *AppStackConfig) Parameters() ([]*cloudformation.Parameter, error)
- func (c *AppStackConfig) ResourceTemplate(config *AppResourcesConfig) (string, error)
- func (s *AppStackConfig) SerializedParameters() (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 BackendServiceConfig
- type BootstrapEnv
- func (e *BootstrapEnv) Parameters() ([]*cloudformation.Parameter, error)
- func (e *BootstrapEnv) SerializedParameters() (string, error)
- func (e *BootstrapEnv) StackName() string
- func (e *BootstrapEnv) Tags() []*cloudformation.Tag
- func (e *BootstrapEnv) Template() (string, error)
- func (e *BootstrapEnv) ToEnvMetadata(stack *cloudformation.Stack) (*config.Environment, error)
- type DeployedAppMetadata
- type ECRImage
- type Env
- type EnvConfig
- type LoadBalancedWebService
- type LoadBalancedWebServiceConfig
- type LoadBalancedWebServiceOption
- type NestedStackConfigurer
- type RequestDrivenWebService
- type RequestDrivenWebServiceConfig
- type RuntimeConfig
- type ScheduledJob
- type ScheduledJobConfig
- type StaticSite
- type StaticSiteConfig
- type TaskStackName
- type WorkerService
- type WorkerServiceConfig
Constants ¶
const ( EnvParamAliasesKey = "Aliases" EnvParamALBWorkloadsKey = "ALBWorkloads" EnvParamServiceDiscoveryEndpoint = "ServiceDiscoveryEndpoint" )
Parameter keys.
const ( EnvOutputVPCID = "VpcId" EnvOutputPublicSubnets = "PublicSubnets" EnvOutputPrivateSubnets = "PrivateSubnets" )
Output keys.
const ( LBWebServiceDNSDelegatedParamKey = "DNSDelegated" LBWebServiceNLBAliasesParamKey = "NLBAliases" LBWebServiceNLBPortParamKey = "NLBPort" )
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" WorkloadEnvFileARNParamKey = "EnvFileARN" WorkloadLoggingEnvFileARNParamKey = "LoggingEnvFileARN" FmtSidecarEnvFileARNParamKey = "EnvFileARNFor%s" )
Parameter logical IDs for workloads on ECS.
const ( WorkloadTargetContainerParamKey = "TargetContainer" WorkloadTargetPortParamKey = "TargetPort" WorkloadHTTPSParamKey = "HTTPSEnabled" WorkloadRulePathParamKey = "RulePath" WorkloadStickinessParamKey = "Stickiness" )
Parameter logical IDs for workloads on ECS with a Load Balancer.
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 (
// DefaultVPCCIDR is the default CIDR used for a manged VPC.
DefaultVPCCIDR = "10.0.0.0/16"
)
const (
ScheduledJobScheduleParamKey = "Schedule"
)
Parameter logical IDs for a scheduled job
const (
// TaskOutputS3Bucket is the CFN stack output logical ID for a task's S3 bucket.
TaskOutputS3Bucket = "S3Bucket"
)
Variables ¶
var ( // DefaultPublicSubnetCIDRs contains two default CIDRs for the two managed public subnets. DefaultPublicSubnetCIDRs = []string{"10.0.0.0/24", "10.0.1.0/24"} // DefaultPrivateSubnetCIDRs contains two default CIDRs for the two managed private subnets. DefaultPrivateSubnetCIDRs = []string{"10.0.2.0/24", "10.0.3.0/24"} )
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 NameForPipeline ¶ added in v1.16.0
NameForPipeline returns the stack name for a pipeline, depending on whether it has been deployed using the legacy scheme. Note that it doesn't cut name to length of 128 like service stack name. It expects CloudFormation to error out when the name is to long.
func NameForWorkload ¶ added in v1.27.0
NameForWorkload returns the stack name for a workload.
func NewPipelineStackConfig ¶
func NewPipelineStackConfig(in *deploy.CreatePipelineInput) *pipelineStackConfig
NewPipelineStackConfig sets up a struct which can provide values to CloudFormation for spinning up a pipeline.
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.
func WithNLB ¶ added in v1.13.0
func WithNLB(cidrBlocks []string) func(s *LoadBalancedWebService)
WithNLB enables Network Load Balancer in a LoadBalancedWebService.
Types ¶
type Addons ¶ added in v1.25.0
type Addons struct { S3ObjectURL string // S3ObjectURL is the URL where the addons template is uploaded. Stack NestedStackConfigurer // Stack generates the template and the parameters to the addons. }
Addons contains information about a packaged addons.
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 // A bucket used for any Copilot artifacts that must be stored in S3 (pipelines, env files, etc). 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 AppResources ¶ added in v1.28.0
type AppResources struct {
AppResourcesConfig `yaml:",inline"`
}
AppResources is a configuration for a deployed Application StackSet.
func (*AppResources) UnmarshalYAML ¶ added in v1.28.0
func (s *AppResources) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML overrides the default YAML unmarshaling logic for the Image struct, allowing it to perform more complex unmarshaling behavior. This method implements the yaml.Unmarshaler (v3) interface.
type AppResourcesConfig ¶
type AppResourcesConfig struct { Accounts []string `yaml:"Accounts"` Services []string `yaml:"Services"` // Deprecated since v1.2.0: Use Workloads instead of Services. Workloads []AppResourcesWorkload `yaml:"Workloads"` 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 AppResourcesWorkload ¶ added in v1.28.0
AppResourcesWorkload is a workload configuration for a deployed Application StackSet
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) SerializedParameters ¶ added in v1.16.0
func (s *AppStackConfig) SerializedParameters() (string, error)
SerializedParameters returns the CloudFormation stack's parameters serialized to a JSON document.
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 application 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(conf BackendServiceConfig) (*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 JSON document.
func (*BackendService) Template ¶
func (s *BackendService) Template() (string, error)
Template returns the CloudFormation template for the backend service.
type BackendServiceConfig ¶ added in v1.19.0
type BackendServiceConfig struct { App *config.Application EnvManifest *manifest.Environment Manifest *manifest.BackendService ArtifactBucketName string RawManifest []byte // Content of the manifest file without any transformations. RuntimeConfig RuntimeConfig Addons NestedStackConfigurer }
BackendServiceConfig contains data required to initialize a backend service stack.
type BootstrapEnv ¶ added in v1.25.0
type BootstrapEnv Env
BootstrapEnv contains information for creating a stack bootstrapping environment resources.
func NewBootstrapEnvStackConfig ¶ added in v1.20.0
func NewBootstrapEnvStackConfig(input *EnvConfig) *BootstrapEnv
NewBootstrapEnvStackConfig sets up a BootstrapEnv struct.
func (*BootstrapEnv) Parameters ¶ added in v1.25.0
func (e *BootstrapEnv) Parameters() ([]*cloudformation.Parameter, error)
Parameters returns the parameters to be passed into the bootstrap stack's CloudFormation template.
func (*BootstrapEnv) SerializedParameters ¶ added in v1.25.0
func (e *BootstrapEnv) SerializedParameters() (string, error)
SerializedParameters returns the CloudFormation stack's parameters serialized to a YAML document annotated with comments for readability to users.
func (*BootstrapEnv) StackName ¶ added in v1.25.0
func (e *BootstrapEnv) StackName() string
StackName returns the name of the CloudFormation stack (based on the app and env names).
func (*BootstrapEnv) Tags ¶ added in v1.25.0
func (e *BootstrapEnv) Tags() []*cloudformation.Tag
Tags returns the tags that should be applied to the bootstrap CloudFormation stack.
func (*BootstrapEnv) Template ¶ added in v1.25.0
func (e *BootstrapEnv) Template() (string, error)
Template returns the CloudFormation template to bootstrap environment resources.
func (*BootstrapEnv) ToEnvMetadata ¶ added in v1.25.0
func (e *BootstrapEnv) ToEnvMetadata(stack *cloudformation.Stack) (*config.Environment, error)
ToEnvMetadata inspects an environment cloudformation stack and constructs an environment struct out of it (including resources like ECR Repo).
type DeployedAppMetadata ¶
type DeployedAppMetadata struct {
Metadata AppResources `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. ContainerName string // The container name. MainContainerName string // The workload's container name. }
ECRImage represents configuration about the pushed ECR image that is needed to create a CloudFormation stack.
func (ECRImage) URI ¶ added in v1.27.0
URI 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 Env ¶ added in v1.25.0
type Env struct {
// contains filtered or unexported fields
}
Env is for providing all the values to set up an environment stack and to interpret the outputs from it.
func NewEnvConfigFromExistingStack ¶ added in v1.20.0
func NewEnvConfigFromExistingStack(in *EnvConfig, lastForceUpdateID string, prevParams []*cloudformation.Parameter) (*Env, error)
NewEnvConfigFromExistingStack returns a CloudFormation stack configuration for updating an environment.
func NewEnvStackConfig ¶
NewEnvStackConfig returns a CloudFormation stack configuration for deploying a brand-new environment.
func (*Env) Parameters ¶ added in v1.25.0
func (e *Env) Parameters() ([]*cloudformation.Parameter, error)
Parameters returns the parameters to be passed into an environment CloudFormation template.
func (*Env) SerializedParameters ¶ added in v1.25.0
SerializedParameters returns the CloudFormation stack's parameters serialized to a JSON document.
func (*Env) StackName ¶ added in v1.25.0
StackName returns the name of the CloudFormation stack (based on the app and env names).
func (*Env) Tags ¶ added in v1.25.0
func (e *Env) Tags() []*cloudformation.Tag
Tags returns the tags that should be applied to the environment CloudFormation stack.
type EnvConfig ¶ added in v1.25.0
type EnvConfig struct { Name string // Name of the environment, must be unique within an application. Version string // The version of the environment template to create the stack. If empty, creates the legacy stack. // Application regional configurations. App deploy.AppInformation // Information about the application that the environment belongs to, include app name, DNS name, the principal ARN of the account. AdditionalTags map[string]string // AdditionalTags are labels applied to resources under the application. ArtifactBucketARN string // ARN of the regional application bucket. ArtifactBucketKeyARN string // ARN of the KMS key used to encrypt the contents in the regional application bucket. PermissionsBoundary string // Optional. An IAM Managed Policy name used as permissions boundary for IAM roles. // Runtime configurations. Addons *Addons CustomResourcesURLs map[string]string // Mapping of Custom Resource Function Name to the S3 URL where the function zip file is stored. // User inputs. ImportVPCConfig *config.ImportVPC // Optional configuration if users have an existing VPC. AdjustVPCConfig *config.AdjustVPC // Optional configuration if users want to override default VPC configuration. ImportCertARNs []string // Optional configuration if users want to import certificates. InternalALBSubnets []string // Optional configuration if users want to specify internal ALB placement. AllowVPCIngress bool // Optional configuration to allow access to internal ALB from ports 80/443. CIDRPrefixListIDs []string // Optional configuration to specify public security group ingress based on prefix lists. PublicALBSourceIPs []string // Optional configuration to specify public security group ingress based on customer given source IPs. InternalLBSourceIPs []string // Optional configuration to specify private security group ingress based on customer given source IPs. Telemetry *config.Telemetry // Optional observability and monitoring configuration. Mft *manifest.Environment // Unmarshaled and interpolated manifest object. RawMft []byte // Content of the environment manifest without any modifications. ForceUpdate bool }
EnvConfig holds the fields required to deploy an environment.
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 NewLoadBalancedWebService ¶
func NewLoadBalancedWebService(conf LoadBalancedWebServiceConfig, opts ...LoadBalancedWebServiceOption) (*LoadBalancedWebService, error)
NewLoadBalancedWebService creates a new CFN stack with an ECS service from a manifest file, given the options.
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 JSON document.
func (*LoadBalancedWebService) Template ¶
func (s *LoadBalancedWebService) Template() (string, error)
Template returns the CloudFormation template for the service parametrized for the environment.
type LoadBalancedWebServiceConfig ¶ added in v1.18.0
type LoadBalancedWebServiceConfig struct { App *config.Application EnvManifest *manifest.Environment Manifest *manifest.LoadBalancedWebService RawManifest []byte // Content of the manifest file without any transformations. RuntimeConfig RuntimeConfig RootUserARN string ArtifactBucketName string Addons NestedStackConfigurer }
LoadBalancedWebServiceConfig contains fields to configure LoadBalancedWebService.
type LoadBalancedWebServiceOption ¶ added in v1.13.0
type LoadBalancedWebServiceOption func(s *LoadBalancedWebService)
LoadBalancedWebServiceOption is used to configuring an optional field for LoadBalancedWebService.
type NestedStackConfigurer ¶ added in v1.25.0
NestedStackConfigurer configures a nested stack that deploys addons.
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(cfg RequestDrivenWebServiceConfig) (*RequestDrivenWebService, error)
NewRequestDrivenWebService creates a new RequestDrivenWebService stack from a manifest file.
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 JSON document.
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 RequestDrivenWebServiceConfig ¶ added in v1.20.0
type RequestDrivenWebServiceConfig struct { App deploy.AppInformation Env string Manifest *manifest.RequestDrivenWebService RawManifest []byte ArtifactBucketName string RuntimeConfig RuntimeConfig Addons NestedStackConfigurer }
RequestDrivenWebServiceConfig contains data required to initialize a request-driven web service stack.
type RuntimeConfig ¶
type RuntimeConfig struct { PushedImages map[string]ECRImage // Optional. Image location in an ECR repository. AddonsTemplateURL string // Optional. S3 object URL for the addons template. EnvFileARNs map[string]string // Optional. S3 object ARNs for any env files. Map keys are container names. AdditionalTags map[string]string // AdditionalTags are labels applied to resources in the workload stack. CustomResourcesURL map[string]string // Mapping of Custom Resource Function Name to the S3 URL where the function zip file is stored. // The target environment metadata. ServiceDiscoveryEndpoint string // Endpoint for the service discovery namespace in the environment. AccountID string Region string EnvVersion string Version string }
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(cfg ScheduledJobConfig) (*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 JSON document.
func (*ScheduledJob) Template ¶ added in v0.5.0
func (j *ScheduledJob) Template() (string, error)
Template returns the CloudFormation template for the scheduled job.
type ScheduledJobConfig ¶ added in v1.20.0
type ScheduledJobConfig struct { App *config.Application Env string Manifest *manifest.ScheduledJob ArtifactBucketName string RawManifest []byte RuntimeConfig RuntimeConfig Addons NestedStackConfigurer }
ScheduledJobConfig contains data required to initialize a scheduled job stack.
type StaticSite ¶ added in v1.27.0
type StaticSite struct {
// contains filtered or unexported fields
}
StaticSite represents the configuration needed to create a CloudFormation stack from a static site service manifest.
func NewStaticSite ¶ added in v1.27.0
func NewStaticSite(cfg *StaticSiteConfig) (*StaticSite, error)
NewStaticSite creates a new CFN stack from a manifest file, given the options.
func (*StaticSite) Parameters ¶ added in v1.27.0
func (s *StaticSite) Parameters() ([]*cloudformation.Parameter, error)
Parameters returns the list of CloudFormation parameters used by the template.
func (*StaticSite) SerializedParameters ¶ added in v1.27.0
func (s *StaticSite) SerializedParameters() (string, error)
SerializedParameters returns the CloudFormation stack's parameters serialized to a JSON document.
func (StaticSite) StackName ¶ added in v1.27.0
func (w StaticSite) StackName() string
StackName returns the name of the stack.
func (StaticSite) Tags ¶ added in v1.27.0
func (w StaticSite) Tags() []*cloudformation.Tag
Tags returns the list of tags to apply to the CloudFormation stack.
func (*StaticSite) Template ¶ added in v1.27.0
func (s *StaticSite) Template() (string, error)
Template returns the CloudFormation template for the service parametrized for the environment.
type StaticSiteConfig ¶ added in v1.27.0
type StaticSiteConfig struct { App *config.Application EnvManifest *manifest.Environment Manifest *manifest.StaticSite RawManifest []byte // Content of the manifest file without any transformations. RuntimeConfig RuntimeConfig RootUserARN string ArtifactBucketName string Addons NestedStackConfigurer AssetMappingURL string }
StaticSiteConfig contains fields to configure StaticSite.
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(cfg WorkerServiceConfig) (*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 JSON document.
func (*WorkerService) Template ¶ added in v1.10.0
func (s *WorkerService) Template() (string, error)
Template returns the CloudFormation template for the worker service.
type WorkerServiceConfig ¶ added in v1.20.0
type WorkerServiceConfig struct { App *config.Application Env string Manifest *manifest.WorkerService ArtifactBucketName string RawManifest []byte RuntimeConfig RuntimeConfig Addons NestedStackConfigurer }
WorkerServiceConfig contains data required to initialize a scheduled job stack.