Documentation ¶
Overview ¶
Package deploy holds the structures to deploy infrastructure resources. This file defines application deployment resources.
Package deploy holds the structures to deploy infrastructure resources.
Package deploy holds the structures to deploy infrastructure resources. This file defines environment deployment resources.
Package deploy holds the structures to deploy infrastructure resources. This file defines pipeline deployment resources.
Package deploy holds the structures to deploy infrastructure resources. This file defines service deployment resources.
Package deploy holds the structures to deploy infrastructure resources. This file defines workload deployment resources.
Index ¶
- Constants
- type ArtifactBucket
- type AssociatedEnvironment
- type ConfigStoreClient
- type CreateAppInput
- type CreateEnvironmentInput
- type CreateEnvironmentResponse
- type CreatePipelineInput
- type CreateTaskResourcesInput
- type DeleteWorkloadInput
- type PipelineStage
- type Resource
- type ResourceEvent
- type Source
- type Store
Constants ¶
const ( // AppTagKey is tag key for Copilot app. AppTagKey = "copilot-application" // EnvTagKey is tag key for Copilot env. EnvTagKey = "copilot-environment" // ServiceTagKey is tag key for Copilot svc. ServiceTagKey = "copilot-service" // TaskTagKey is tag key for Copilot task. TaskTagKey = "copilot-task" )
const ( // LegacyEnvTemplateVersion is the version associated with the environment template before we started versioning. LegacyEnvTemplateVersion = "v0.0.0" // LatestEnvTemplateVersion is the latest version number available for environment templates. LatestEnvTemplateVersion = "v1.0.0" )
const ( // WorkloadCfnTemplateNameFormat is the base output file name when `service package` // or `job package` is called. This is also used to render the pipeline CFN template. WorkloadCfnTemplateNameFormat = "%s-%s.stack.yml" // WorkloadCfnTemplateConfigurationNameFormat is the base output configuration // file name when `service package` or `job package is called. It's also used to // render the pipeline CFN template. WorkloadCfnTemplateConfigurationNameFormat = "%s-%s.params.json" // AddonsCfnTemplateNameFormat is the addons output file name when `service package` // is called. AddonsCfnTemplateNameFormat = "%s.addons.stack.yml" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArtifactBucket ¶
type ArtifactBucket struct { // The name of the S3 bucket. BucketName string // The ARN of the KMS key used to en/decrypt artifacts stored in this bucket. KeyArn string }
ArtifactBucket represents an S3 bucket used by the CodePipeline to store intermediate artifacts produced by the pipeline.
func (*ArtifactBucket) Region ¶
func (a *ArtifactBucket) Region() (string, error)
Region parses out the region from the ARN of the KMS key associated with the artifact bucket.
type AssociatedEnvironment ¶
type AssociatedEnvironment struct { // Name of the environment, must be unique within an application. // This is also the name of the pipeline stage. Name string // The region this environment is stored in. Region string // AccountID of the account this environment is stored in. AccountID string }
AssociatedEnvironment defines the necessary information a pipeline stage needs for an Config Environment.
type ConfigStoreClient ¶
type ConfigStoreClient interface { GetEnvironment(appName string, environmentName string) (*config.Environment, error) ListEnvironments(appName string) ([]*config.Environment, error) GetService(appName, svcName string) (*config.Workload, error) }
ConfigStoreClient wraps config store methods utilized by deploy store.
type CreateAppInput ¶
type CreateAppInput struct { Name string // Name of the application that needs to be created. AccountID string // AWS account ID to administrate the application. DNSDelegationAccounts []string // Accounts to grant DNS access to for this application. DomainName string // DNS Name used for this application. AdditionalTags map[string]string // AdditionalTags are labels applied to resources under the application. }
CreateAppInput holds the fields required to create an application stack set.
type CreateEnvironmentInput ¶
type CreateEnvironmentInput struct { // The version of the environment template to create the stack. If empty, creates the legacy stack. Version string AppName string // Name of the application this environment belongs to. Name string // Name of the environment, must be unique within an application. Prod bool // Whether or not this environment is a production environment. ToolsAccountPrincipalARN string // The Principal ARN of the tools account. AppDNSName string // The DNS name of this application, if it exists AdditionalTags map[string]string // AdditionalTags are labels applied to resources under the application. ImportVPCConfig *config.ImportVPC // Optional configuration if users have an existing VPC. AdjustVPCConfig *config.AdjustVPC // Optional configuration if users want to override default VPC configuration. CFNServiceRoleARN string // Optional. A service role ARN that CloudFormation should use to make calls to resources in the stack. }
CreateEnvironmentInput holds the fields required to deploy an environment.
type CreateEnvironmentResponse ¶
type CreateEnvironmentResponse struct { Env *config.Environment Err error }
CreateEnvironmentResponse holds the created environment on successful deployment. Otherwise, the environment is set to nil and a descriptive error is returned.
type CreatePipelineInput ¶
type CreatePipelineInput struct { // Name of the application this pipeline belongs to AppName string // Name of the pipeline Name string // The source code provider for this pipeline Source *Source // The stages of the pipeline. The order of stages in this list // will be the order we deploy to. Stages []PipelineStage // A list of artifact buckets and corresponding KMS keys that will // be used in this pipeline. ArtifactBuckets []ArtifactBucket // AdditionalTags are labels applied to resources under the application. AdditionalTags map[string]string }
CreatePipelineInput represents the fields required to deploy a pipeline.
type CreateTaskResourcesInput ¶
type CreateTaskResourcesInput struct { Name string CPU int Memory int Image string TaskRole string ExecutionRole string Command []string EnvVars map[string]string App string Env string AdditionalTags map[string]string }
CreateTaskResourcesInput holds the fields required to create a task stack.
type DeleteWorkloadInput ¶ added in v0.5.0
type DeleteWorkloadInput struct { Name string // Name of the workload that needs to be deleted. EnvName string // Name of the environment the service is deployed in. AppName string // Name of the application the service belongs to. }
DeleteWorkloadInput holds the fields required to delete a workload.
type PipelineStage ¶
type PipelineStage struct { *AssociatedEnvironment LocalWorkloads []string RequiresApproval bool TestCommands []string }
PipelineStage represents configuration for each deployment stage of a workspace. A stage consists of the Config Environment the pipeline is deploying to, the containerized services that will be deployed, and test commands, if the user has opted to add any.
func (*PipelineStage) WorkloadTemplateConfigurationPath ¶ added in v0.5.0
func (s *PipelineStage) WorkloadTemplateConfigurationPath(wlName string) string
WorkloadTemplateConfigurationPath returns the full path to the workload CFN template configuration file built during the build stage.
func (*PipelineStage) WorkloadTemplatePath ¶ added in v0.5.0
func (s *PipelineStage) WorkloadTemplatePath(wlName string) string
WorkloadTemplatePath returns the full path to the workload CFN template built during the build stage.
type ResourceEvent ¶
ResourceEvent represents a status update for an AWS resource during a deployment.
type Source ¶
type Source struct { // The name of the source code provider. For example, "GitHub" ProviderName string // Contains provider-specific configurations, such as: // "repository": "aws/amazon-ecs-cli-v2" // "githubPersonalAccessTokenSecretId": "heyyo" Properties map[string]interface{} }
Source defines the source of the artifacts to be built and deployed.
func (*Source) GitHubPersonalAccessTokenSecretID ¶
GitHubPersonalAccessTokenSecretID returns the ID of the secret in the Secrets manager, which stores the GitHub Personal Access token if the provider is "GitHub". Otherwise, it returns an error.
func (*Source) Owner ¶
Owner returns the repository owner portion. For example, given "aws/amazon-ecs-cli-v2", this function returns "aws".
func (*Source) Repository ¶
Repository returns the repository portion. For example, given "aws/amazon-ecs-cli-v2", this function returns "amazon-ecs-cli-v2".
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store fetches information on deployed services.
func NewStore ¶
func NewStore(store ConfigStoreClient) (*Store, error)
NewStore returns a new store.
func (*Store) IsServiceDeployed ¶
IsServiceDeployed returns whether a service is deployed in an environment or not.
func (*Store) ListDeployedServices ¶
ListDeployedServices returns the names of deployed services in an environment part of an application.
Directories ¶
Path | Synopsis |
---|---|
Package cloudformation provides functionality to deploy CLI concepts with AWS CloudFormation.
|
Package cloudformation provides functionality to deploy CLI concepts with AWS CloudFormation. |
mocks
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
stack/mocks
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |