Documentation ¶
Overview ¶
Package cloudformation provides functionality to deploy CLI concepts with AWS CloudFormation.
Package cloudformation provides functionality to deploy ECS resources with AWS CloudFormation.
Package cloudformation provides functionality to deploy ECS resources with AWS CloudFormation. This file defines API for deploying a pipeline.
Index ¶
- func IsEmptyErr(err error) bool
- type AddEnvToAppOpts
- type CloudFormation
- func (cf CloudFormation) AddEnvToApp(opts *AddEnvToAppOpts) error
- func (cf CloudFormation) AddJobToApp(app *config.Application, jobName string) error
- func (cf CloudFormation) AddPipelineResourcesToApp(app *config.Application, appRegion string) error
- func (cf CloudFormation) AddServiceToApp(app *config.Application, svcName string) error
- func (cf CloudFormation) CreateAndRenderEnvironment(env *deploy.CreateEnvironmentInput) error
- func (cf CloudFormation) CreatePipeline(in *deploy.CreatePipelineInput, bucketName string) error
- func (cf CloudFormation) DelegateDNSPermissions(app *config.Application, accountID string) error
- func (cf CloudFormation) DeleteApp(appName string) error
- func (cf CloudFormation) DeleteEnvironment(appName, envName, cfnExecRoleARN string) error
- func (cf CloudFormation) DeletePipeline(pipeline deploy.Pipeline) error
- func (cf CloudFormation) DeleteTask(task deploy.TaskStackInfo) error
- func (cf CloudFormation) DeleteWorkload(in deploy.DeleteWorkloadInput) error
- func (cf CloudFormation) DeployApp(in *deploy.CreateAppInput) error
- func (cf CloudFormation) DeployService(conf StackConfiguration, bucketName string, opts ...cloudformation.StackOption) error
- func (cf CloudFormation) DeployTask(input *deploy.CreateTaskResourcesInput, opts ...cloudformation.StackOption) error
- func (cf CloudFormation) DeployedEnvironmentParameters(appName, envName string) ([]*awscfn.Parameter, error)
- func (cf CloudFormation) EnvironmentTemplate(appName, envName string) (string, error)
- func (cf CloudFormation) ForceUpdateOutputID(app, env string) (string, error)
- func (cf CloudFormation) GetAppResourcesByRegion(app *config.Application, region string) (*stack.AppRegionalResources, error)
- func (cf CloudFormation) GetEnvironment(appName, envName string) (*config.Environment, error)
- func (cf CloudFormation) GetRegionalAppResources(app *config.Application) ([]*stack.AppRegionalResources, error)
- func (cf CloudFormation) GetTaskStack(taskName string) (*deploy.TaskStackInfo, error)
- func (cf CloudFormation) ListDefaultTaskStacks() ([]deploy.TaskStackInfo, error)
- func (cf CloudFormation) ListTaskStacks(appName, envName string) ([]deploy.TaskStackInfo, error)
- func (cf CloudFormation) PipelineExists(in *deploy.CreatePipelineInput) (bool, error)
- func (cf CloudFormation) RemoveJobFromApp(app *config.Application, jobName string) error
- func (cf CloudFormation) RemoveServiceFromApp(app *config.Application, svcName string) error
- func (cf CloudFormation) UpdateAndRenderEnvironment(conf StackConfiguration, bucketARN string, opts ...cloudformation.StackOption) error
- func (cf CloudFormation) UpdateEnvironmentTemplate(appName, envName, templateBody, cfnExecRoleARN string) error
- func (cf CloudFormation) UpdatePipeline(in *deploy.CreatePipelineInput, bucketName string) error
- func (cf CloudFormation) UpgradeApplication(in *deploy.CreateAppInput) error
- type OptFn
- type StackConfiguration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsEmptyErr ¶ added in v1.21.0
IsEmptyErr returns true if the error occurred because the cloudformation resource does not exist or does not contain any sub-resources.
Types ¶
type AddEnvToAppOpts ¶ added in v1.4.0
type AddEnvToAppOpts struct { App *config.Application EnvName string EnvAccountID string EnvRegion string }
AddEnvToAppOpts contains the parameters to call AddEnvToApp.
type CloudFormation ¶
type CloudFormation struct {
// contains filtered or unexported fields
}
CloudFormation wraps the CloudFormationAPI interface
func New ¶
func New(sess *session.Session, opts ...OptFn) CloudFormation
New returns a configured CloudFormation client.
func (CloudFormation) AddEnvToApp ¶
func (cf CloudFormation) AddEnvToApp(opts *AddEnvToAppOpts) error
AddEnvToApp takes a new environment and updates the application configuration with new Account IDs in resource policies (KMS Keys and ECR Repos) - and sets up a new stack instance if the environment is in a new region.
func (CloudFormation) AddJobToApp ¶ added in v0.5.0
func (cf CloudFormation) AddJobToApp(app *config.Application, jobName string) error
AddJobToApp attempts to add new job-specific resources to the application resource stack. Currently, this means that we'll set up an ECR repo with a policy for all envs to be able to pull from it.
func (CloudFormation) AddPipelineResourcesToApp ¶
func (cf CloudFormation) AddPipelineResourcesToApp( app *config.Application, appRegion string) error
AddPipelineResourcesToApp conditionally adds resources needed to support a pipeline in the application region (i.e. the same region that hosts our SSM store). This is necessary because the application region might not contain any environment.
func (CloudFormation) AddServiceToApp ¶
func (cf CloudFormation) AddServiceToApp(app *config.Application, svcName string) error
AddServiceToApp attempts to add new service specific resources to the application resource stack. Currently, this means that we'll set up an ECR repo with a policy for all envs to be able to pull from it.
func (CloudFormation) CreateAndRenderEnvironment ¶ added in v1.19.0
func (cf CloudFormation) CreateAndRenderEnvironment(env *deploy.CreateEnvironmentInput) error
CreateAndRenderEnvironment creates the CloudFormation stack for an environment, and render the stack creation to out.
func (CloudFormation) CreatePipeline ¶
func (cf CloudFormation) CreatePipeline(in *deploy.CreatePipelineInput, bucketName string) error
CreatePipeline sets up a new CodePipeline for deploying services.
func (CloudFormation) DelegateDNSPermissions ¶
func (cf CloudFormation) DelegateDNSPermissions(app *config.Application, accountID string) error
DelegateDNSPermissions grants the provided account ID the ability to write to this application's DNS HostedZone. This allows us to perform cross account DNS delegation.
func (CloudFormation) DeleteApp ¶
func (cf CloudFormation) DeleteApp(appName string) error
DeleteApp deletes all application specific StackSet and Stack resources.
func (CloudFormation) DeleteEnvironment ¶
func (cf CloudFormation) DeleteEnvironment(appName, envName, cfnExecRoleARN string) error
DeleteEnvironment deletes the CloudFormation stack of an environment.
func (CloudFormation) DeletePipeline ¶
func (cf CloudFormation) DeletePipeline(pipeline deploy.Pipeline) error
DeletePipeline removes the CodePipeline stack.
func (CloudFormation) DeleteTask ¶ added in v1.1.0
func (cf CloudFormation) DeleteTask(task deploy.TaskStackInfo) error
DeleteTask deletes a Copilot-created one-off task stack using the RoleARN that stack was created with. If there is no role arn specified, it tries to delete the stack using the default session.
func (CloudFormation) DeleteWorkload ¶ added in v0.5.0
func (cf CloudFormation) DeleteWorkload(in deploy.DeleteWorkloadInput) error
DeleteWorkload removes the CloudFormation stack of a deployed workload.
func (CloudFormation) DeployApp ¶
func (cf CloudFormation) DeployApp(in *deploy.CreateAppInput) error
DeployApp sets up everything required for our application-wide resources. These resources include things that are regional, rather than scoped to a particular environment, such as ECR Repos, CodePipeline KMS keys & S3 buckets. We deploy application resources through StackSets - that way we can have one template that we update and all regional stacks are updated.
func (CloudFormation) DeployService ¶
func (cf CloudFormation) DeployService(conf StackConfiguration, bucketName string, opts ...cloudformation.StackOption) error
DeployService deploys a service stack and renders progress updates to out until the deployment is done. If the service stack doesn't exist, then it creates the stack. If the service stack already exists, it updates the stack.
func (CloudFormation) DeployTask ¶
func (cf CloudFormation) DeployTask(input *deploy.CreateTaskResourcesInput, opts ...cloudformation.StackOption) error
DeployTask deploys a task stack, renders the deployment to out until it is done. If the task stack doesn't exist, then it creates the stack. If the task stack already exists, it updates the stack. If the task stack doesn't have any changes, it returns nil
func (CloudFormation) DeployedEnvironmentParameters ¶ added in v1.21.1
func (cf CloudFormation) DeployedEnvironmentParameters(appName, envName string) ([]*awscfn.Parameter, error)
DeployedEnvironmentParameters returns the environment stack's parameters.
func (CloudFormation) EnvironmentTemplate ¶ added in v0.5.0
func (cf CloudFormation) EnvironmentTemplate(appName, envName string) (string, error)
EnvironmentTemplate returns the environment stack's template.
func (CloudFormation) ForceUpdateOutputID ¶ added in v1.20.0
func (cf CloudFormation) ForceUpdateOutputID(app, env string) (string, error)
ForceUpdateOutputID returns the environment stack's last force update ID.
func (CloudFormation) GetAppResourcesByRegion ¶
func (cf CloudFormation) GetAppResourcesByRegion(app *config.Application, region string) (*stack.AppRegionalResources, error)
GetAppResourcesByRegion fetches all the regional resources for a particular region.
func (CloudFormation) GetEnvironment ¶
func (cf CloudFormation) GetEnvironment(appName, envName string) (*config.Environment, error)
GetEnvironment returns the Environment metadata from the CloudFormation stack.
func (CloudFormation) GetRegionalAppResources ¶
func (cf CloudFormation) GetRegionalAppResources(app *config.Application) ([]*stack.AppRegionalResources, error)
GetRegionalAppResources fetches all the regional resources for a particular application.
func (CloudFormation) GetTaskStack ¶ added in v1.2.0
func (cf CloudFormation) GetTaskStack(taskName string) (*deploy.TaskStackInfo, error)
GetTaskStack grabs information about the given one-off task's cloudformation stack and returns it to the user in a convenient struct.
func (CloudFormation) ListDefaultTaskStacks ¶ added in v1.1.0
func (cf CloudFormation) ListDefaultTaskStacks() ([]deploy.TaskStackInfo, error)
ListDefaultTaskStacks returns all the CF stacks created by copilot but not associated with an application.
func (CloudFormation) ListTaskStacks ¶ added in v1.1.0
func (cf CloudFormation) ListTaskStacks(appName, envName string) ([]deploy.TaskStackInfo, error)
ListTaskStacks returns all the CF stacks which represent one-off copilot tasks in a given application's environments.
func (CloudFormation) PipelineExists ¶
func (cf CloudFormation) PipelineExists(in *deploy.CreatePipelineInput) (bool, error)
PipelineExists checks if the pipeline with the provided config exists.
func (CloudFormation) RemoveJobFromApp ¶ added in v0.5.0
func (cf CloudFormation) RemoveJobFromApp(app *config.Application, jobName string) error
RemoveJobFromApp attempts to remove job-specific resources (ECR repositories) from the application resource stack.
func (CloudFormation) RemoveServiceFromApp ¶
func (cf CloudFormation) RemoveServiceFromApp(app *config.Application, svcName string) error
RemoveServiceFromApp attempts to remove service-specific resources (ECR repositories) from the application resource stack.
func (CloudFormation) UpdateAndRenderEnvironment ¶ added in v1.19.0
func (cf CloudFormation) UpdateAndRenderEnvironment(conf StackConfiguration, bucketARN string, opts ...cloudformation.StackOption) error
UpdateAndRenderEnvironment updates the CloudFormation stack for an environment, and render the stack creation to out.
func (CloudFormation) UpdateEnvironmentTemplate ¶ added in v0.5.0
func (cf CloudFormation) UpdateEnvironmentTemplate(appName, envName, templateBody, cfnExecRoleARN string) error
UpdateEnvironmentTemplate updates the cloudformation stack's template body while maintaining the parameters and tags.
func (CloudFormation) UpdatePipeline ¶
func (cf CloudFormation) UpdatePipeline(in *deploy.CreatePipelineInput, bucketName string) error
UpdatePipeline updates an existing CodePipeline for deploying services.
func (CloudFormation) UpgradeApplication ¶ added in v1.5.0
func (cf CloudFormation) UpgradeApplication(in *deploy.CreateAppInput) error
type OptFn ¶ added in v1.21.0
type OptFn func(cfn *CloudFormation)
OptFn represents an optional configuration function for the CloudFormation client.
func WithProgressTracker ¶ added in v1.21.0
func WithProgressTracker(fw progress.FileWriter) OptFn
WithProgressTracker updates the CloudFormation client to write stack updates to a file.
type StackConfiguration ¶
type StackConfiguration interface { StackName() string Template() (string, error) Parameters() ([]*sdkcloudformation.Parameter, error) Tags() []*sdkcloudformation.Tag SerializedParameters() (string, error) }
StackConfiguration represents the set of methods needed to deploy a cloudformation stack.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
Package stack provides functionality to transform manifest files and additional runtime configuration into CloudFormation stacks.
|
Package stack provides functionality to transform manifest files and additional runtime configuration into CloudFormation stacks. |
mocks
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |