manifest

package
v1.34.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2024 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Overview

Package manifest provides functionality to create Manifest files.

Index

Constants

View Source
const (
	DefaultHealthCheckPath        = "/"
	DefaultHealthCheckAdminPath   = "admin"
	DefaultHealthCheckGracePeriod = 60
	DefaultDeregistrationDelay    = 60
)

Default values for HTTPHealthCheck for a load balanced web service.

View Source
const (
	GithubProviderName     = "GitHub"
	GithubV1ProviderName   = "GitHubV1"
	CodeCommitProviderName = "CodeCommit"
	BitbucketProviderName  = "Bitbucket"
)

Valid source providers for Copilot Pipelines.

View Source
const (
	// TCP is the tcp protocol for NLB.
	TCP = "TCP"

	// TLS is the tls protocol for NLB.
	TLS = "TLS"

	// UDP is the udp protocol for NLB.
	UDP = "UDP"
)
View Source
const (
	PublicSubnetPlacement  = PlacementString("public")
	PrivateSubnetPlacement = PlacementString("private")
)

AWS VPC subnet placement options.

View Source
const (
	OSLinux                 = dockerengine.OSLinux
	OSWindows               = dockerengine.OSWindows
	OSWindowsServer2019Core = "windows_server_2019_core"
	OSWindowsServer2019Full = "windows_server_2019_full"
	OSWindowsServer2022Core = "windows_server_2022_core"
	OSWindowsServer2022Full = "windows_server_2022_full"

	ArchAMD64 = dockerengine.ArchAMD64
	ArchX86   = dockerengine.ArchX86
	ArchARM   = dockerengine.ArchARM
	ArchARM64 = dockerengine.ArchARM64

	// Minimum CPU and mem values required for Windows-based tasks.
	MinWindowsTaskCPU    = 1024
	MinWindowsTaskMemory = 2048

	// deployment strategies
	ECSDefaultRollingUpdateStrategy  = "default"
	ECSRecreateRollingUpdateStrategy = "recreate"
)

Platform related settings.

View Source
const Environmentmanifestinfo = "Environment"

Environmentmanifestinfo identifies that the type of manifest is environment manifest.

View Source
const (
	FirelensContainerName = "firelens_log_router"
)

Defaults for Firelens configuration.

View Source
const (
	GRPCProtocol = "gRPC" // GRPCProtocol is the HTTP protocol version for gRPC.

)

Variables

View Source
var (
	ErrAppRunnerInvalidPlatformWindows = errors.New("Windows is not supported for App Runner services")
)

Error definitions.

PipelineProviders is the list of all available source integrations.

Functions

func ContainerDependencies added in v1.32.1

func ContainerDependencies(unmarshaledManifest interface{}) map[string]ContainerDependency

ContainerDependencies returns a map of ContainerDependency objects from workload manifest.

func IsArmArch added in v1.13.0

func IsArmArch(arch string) bool

IsArmArch returns whether or not the arch is ARM.

func ParsePortMapping added in v1.14.0

func ParsePortMapping(s *string) (port *string, protocol *string, err error)

ParsePortMapping parses port-protocol string into individual port and protocol strings. Valid examples: 2000/udp, or 2000.

func RedirectPlatform added in v1.12.0

func RedirectPlatform(os, arch, wlType string) (platform string, err error)

RedirectPlatform returns a platform that's supported for the given manifest type.

Types

type AdvancedAlias added in v1.19.0

type AdvancedAlias struct {
	Alias      *string `yaml:"name"`
	HostedZone *string `yaml:"hosted_zone"`
}

AdvancedAlias represents advanced alias configuration.

type AdvancedCDNConfig added in v1.22.0

type AdvancedCDNConfig struct {
	Certificate  *string         `yaml:"certificate,omitempty"`
	TerminateTLS *bool           `yaml:"terminate_tls,omitempty"`
	Static       CDNStaticConfig `yaml:"static_assets,omitempty"`
}

AdvancedCDNConfig represents an advanced configuration for a Content Delivery Network.

type AdvancedCount added in v1.6.0

type AdvancedCount struct {
	Spot         *int                            `yaml:"spot"` // mutually exclusive with other fields
	Range        Range                           `yaml:"range"`
	Cooldown     Cooldown                        `yaml:"cooldown"`
	CPU          ScalingConfigOrT[Percentage]    `yaml:"cpu_percentage"`
	Memory       ScalingConfigOrT[Percentage]    `yaml:"memory_percentage"`
	Requests     ScalingConfigOrT[int]           `yaml:"requests"`
	ResponseTime ScalingConfigOrT[time.Duration] `yaml:"response_time"`
	QueueScaling QueueScaling                    `yaml:"queue_delay"`
	// contains filtered or unexported fields
}

AdvancedCount represents the configurable options for Auto Scaling as well as Capacity configuration (spot).

func (*AdvancedCount) IgnoreRange added in v1.6.0

func (a *AdvancedCount) IgnoreRange() bool

IgnoreRange returns whether desiredCount is specified on spot capacity

func (*AdvancedCount) IsEmpty added in v1.6.0

func (a *AdvancedCount) IsEmpty() bool

IsEmpty returns whether AdvancedCount is empty.

type AdvancedScalingConfig added in v1.19.0

type AdvancedScalingConfig[T ~int | time.Duration] struct {
	Value    *T       `yaml:"value"`
	Cooldown Cooldown `yaml:"cooldown"`
}

AdvancedScalingConfig represents advanced configurable options for a scaling policy.

func (*AdvancedScalingConfig[_]) IsEmpty added in v1.19.0

func (a *AdvancedScalingConfig[_]) IsEmpty() bool

IsEmpty returns whether AdvancedScalingConfig is empty

type AlarmArgs added in v1.25.0

type AlarmArgs struct {
	CPUUtilization    *float64 `yaml:"cpu_utilization"`
	MemoryUtilization *float64 `yaml:"memory_utilization"`
}

AlarmArgs represents specs of CloudWatch alarms for deployment rollbacks.

type Alias added in v1.10.0

type Alias struct {
	AdvancedAliases     []AdvancedAlias
	StringSliceOrString StringSliceOrString
}

Alias is a custom type which supports unmarshaling "http.alias" yaml which can either be of type advancedAlias slice or type StringSliceOrString.

func (*Alias) HostedZones added in v1.21.0

func (a *Alias) HostedZones() []string

HostedZones returns all the hosted zones.

func (*Alias) IsEmpty added in v1.11.0

func (a *Alias) IsEmpty() bool

IsEmpty returns empty if Alias is empty.

func (*Alias) ToString added in v1.14.0

func (a *Alias) ToString() string

ToString converts an Alias to a string.

func (*Alias) ToStringSlice added in v1.10.0

func (a *Alias) ToStringSlice() ([]string, error)

ToStringSlice converts an Alias to a slice of string.

func (*Alias) UnmarshalYAML added in v1.10.0

func (a *Alias) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML overrides the default YAML unmarshaling logic for the Alias struct, allowing it to perform more complex unmarshaling behavior. This method implements the yaml.Unmarshaler (v3) interface.

type AppRunnerInstanceConfig added in v1.7.0

type AppRunnerInstanceConfig struct {
	CPU      *int                 `yaml:"cpu"`
	Memory   *int                 `yaml:"memory"`
	Platform PlatformArgsOrString `yaml:"platform,omitempty"`
}

AppRunnerInstanceConfig contains the instance configuration properties for an App Runner service.

type AuthorizationConfig added in v1.2.0

type AuthorizationConfig struct {
	IAM           *bool   `yaml:"iam"`             // Default true
	AccessPointID *string `yaml:"access_point_id"` // Default ""
}

AuthorizationConfig holds options relating to access points and IAM authorization.

func (*AuthorizationConfig) IsEmpty added in v1.11.0

func (a *AuthorizationConfig) IsEmpty() bool

IsEmpty returns empty if the struct has all zero members.

type BackendService

type BackendService struct {
	Workload             `yaml:",inline"`
	BackendServiceConfig `yaml:",inline"`
	// Use *BackendServiceConfig because of https://github.com/imdario/mergo/issues/146
	Environments map[string]*BackendServiceConfig `yaml:",flow"`
	// contains filtered or unexported fields
}

BackendService holds the configuration to create a backend service manifest.

func NewBackendService

func NewBackendService(props BackendServiceProps) *BackendService

NewBackendService applies the props to a default backend service configuration with minimal task sizes, single replica, no healthcheck, and then returns it.

func (*BackendService) BuildArgs added in v0.3.0

func (s *BackendService) BuildArgs(contextDir string) (map[string]*DockerBuildArgs, error)

BuildArgs returns a docker.BuildArguments object for the service given a context directory.

func (*BackendService) ContainerDependencies added in v1.32.1

func (s *BackendService) ContainerDependencies() map[string]ContainerDependency

ContainerDependencies returns a map of ContainerDependency objects for the BackendService including dependencies for its main container, any logging sidecar, and additional sidecars.

func (*BackendService) Dockerfile added in v1.33.0

func (s *BackendService) Dockerfile() string

Dockerfile returns the relative path of the Dockerfile in the manifest.

func (*BackendService) EnvFiles added in v1.27.0

func (s *BackendService) EnvFiles() map[string]string

EnvFiles returns the locations of all env files against the ws root directory. This method returns a map[string]string where the keys are container names and the values are either env file paths or empty strings.

func (*BackendService) ExposedPorts added in v1.25.0

func (b *BackendService) ExposedPorts() (ExposedPortsIndex, error)

ExposedPorts returns all the ports that are container ports available to receive traffic.

func (*BackendService) MainContainerPort added in v1.26.0

func (s *BackendService) MainContainerPort() string

MainContainerPort returns the main container port if given.

func (*BackendService) MarshalBinary

func (s *BackendService) MarshalBinary() ([]byte, error)

MarshalBinary serializes the manifest object into a binary YAML document. Implements the encoding.BinaryMarshaler interface.

func (*BackendService) Port added in v1.10.0

func (s *BackendService) Port() (port uint16, ok bool)

Port returns the exposed port in the manifest. If the backend service is not meant to be reachable, then ok is set to false.

func (*BackendService) Publish added in v1.10.0

func (s *BackendService) Publish() []Topic

Publish returns the list of topics where notifications can be published.

func (*BackendService) ServiceConnectTarget added in v1.31.0

func (b *BackendService) ServiceConnectTarget(exposedPorts ExposedPortsIndex) *ServiceConnectTargetContainer

ServiceConnectTarget returns the target container and port to be exposed for ServiceConnect.

type BackendServiceConfig

type BackendServiceConfig struct {
	ImageConfig      ImageWithHealthcheckAndOptionalPort `yaml:"image,flow"`
	ImageOverride    `yaml:",inline"`
	HTTP             HTTP `yaml:"http,flow"`
	TaskConfig       `yaml:",inline"`
	Logging          Logging                   `yaml:"logging,flow"`
	Sidecars         map[string]*SidecarConfig `yaml:"sidecars"` // NOTE: keep the pointers because `mergo` doesn't automatically deep merge map's value unless it's a pointer type.
	Network          NetworkConfig             `yaml:"network"`
	PublishConfig    PublishConfig             `yaml:"publish"`
	TaskDefOverrides []OverrideRule            `yaml:"taskdef_overrides"`
	DeployConfig     DeploymentConfig          `yaml:"deployment"`
	Observability    Observability             `yaml:"observability"`
}

BackendServiceConfig holds the configuration that can be overridden per environments.

type BackendServiceProps

type BackendServiceProps struct {
	WorkloadProps
	Port        uint16
	Path        string               // Optional path if multiple ports are exposed.
	HealthCheck ContainerHealthCheck // Optional healthcheck configuration.
	Platform    PlatformArgsOrString // Optional platform configuration.
}

BackendServiceProps represents the configuration needed to create a backend service.

type BitbucketProperties added in v1.3.0

type BitbucketProperties struct {
	RepositoryURL string `structs:"repository" yaml:"repository"`
	Branch        string `structs:"branch" yaml:"branch"`
}

BitbucketProperties contains information for configuring a Bitbucket source provider.

type Build added in v1.6.0

type Build struct {
	Image            string `yaml:"image"`
	Buildspec        string `yaml:"buildspec,omitempty"`
	AdditionalPolicy struct {
		Document yaml.Node `yaml:"PolicyDocument,omitempty"`
	} `yaml:"additional_policy,omitempty"`
}

Build defines the build project to build and test image.

type BuildArgsOrString added in v0.3.0

type BuildArgsOrString struct {
	BuildString *string
	BuildArgs   DockerBuildArgs
}

BuildArgsOrString is a custom type which supports unmarshaling yaml which can either be of type string or type DockerBuildArgs.

func (*BuildArgsOrString) UnmarshalYAML added in v0.3.0

func (b *BuildArgsOrString) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML overrides the default YAML unmarshaling logic for the BuildArgsOrString struct, allowing it to perform more complex unmarshaling behavior. This method implements the yaml.Unmarshaler (v3) interface.

type CDNStaticConfig added in v1.25.0

type CDNStaticConfig struct {
	Location string `yaml:"location,omitempty"`
	Alias    string `yaml:"alias,omitempty"`
	Path     string `yaml:"path,omitempty"`
}

CDNStaticConfig represents the static config for CDN.

func (CDNStaticConfig) IsEmpty added in v1.25.0

func (cfg CDNStaticConfig) IsEmpty() bool

IsEmpty returns true if CDNStaticConfig is not configured.

type CodeCommitProperties added in v1.1.0

type CodeCommitProperties struct {
	RepositoryURL string `structs:"repository" yaml:"repository"`
	Branch        string `structs:"branch" yaml:"branch"`
}

CodeCommitProperties contains information for configuring a CodeCommit source provider.

type CommandOverride added in v1.3.0

type CommandOverride stringSliceOrShellString

CommandOverride is a custom type which supports unmarshalling "command" yaml which can either be of type string or type slice of string.

func (*CommandOverride) ToStringSlice added in v1.4.0

func (c *CommandOverride) ToStringSlice() ([]string, error)

ToStringSlice converts an CommandOverride to a slice of string using shell-style rules.

func (*CommandOverride) UnmarshalYAML added in v1.3.0

func (c *CommandOverride) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML overrides the default YAML unmarshaling logic for the CommandOverride struct, allowing it to perform more complex unmarshaling behavior. This method implements the yaml.Unmarshaler (v3) interface.

type ContainerDependency added in v1.32.1

type ContainerDependency struct {
	IsEssential bool
	DependsOn   DependsOn
}

ContainerDependency represents order of container startup and shutdown. Also indicates if a container is marked as essential or not.

type ContainerHealthCheck

type ContainerHealthCheck struct {
	Command     []string       `yaml:"command"`
	Interval    *time.Duration `yaml:"interval"`
	Retries     *int           `yaml:"retries"`
	Timeout     *time.Duration `yaml:"timeout"`
	StartPeriod *time.Duration `yaml:"start_period"`
}

ContainerHealthCheck holds the configuration to determine if the service container is healthy. See https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-healthcheck.html

func NewDefaultContainerHealthCheck added in v1.11.0

func NewDefaultContainerHealthCheck() *ContainerHealthCheck

NewDefaultContainerHealthCheck returns container health check configuration that's identical to a load balanced web service's defaults.

func (*ContainerHealthCheck) ApplyIfNotSet added in v1.11.0

func (hc *ContainerHealthCheck) ApplyIfNotSet(other *ContainerHealthCheck)

ApplyIfNotSet changes the healthcheck's fields only if they were not set and the other healthcheck has them set.

func (ContainerHealthCheck) IsEmpty added in v1.11.0

func (hc ContainerHealthCheck) IsEmpty() bool

IsEmpty checks if the health check is empty.

type Cooldown added in v1.19.0

type Cooldown struct {
	ScaleInCooldown  *time.Duration `yaml:"in"`
	ScaleOutCooldown *time.Duration `yaml:"out"`
}

Cooldown represents the autoscaling cooldown of resources.

func (*Cooldown) IsEmpty added in v1.19.0

func (c *Cooldown) IsEmpty() bool

IsEmpty returns whether Cooldown is empty

type Count added in v0.4.0

type Count struct {
	Value         *int          // 0 is a valid value, so we want the default value to be nil.
	AdvancedCount AdvancedCount // Mutually exclusive with Value.
}

Count is a custom type which supports unmarshaling yaml which can either be of type int or type AdvancedCount.

func (*Count) Desired added in v1.6.0

func (c *Count) Desired() (*int, error)

Desired returns the desiredCount to be set on the CFN template

func (*Count) IsEmpty added in v1.6.0

func (c *Count) IsEmpty() bool

IsEmpty returns whether Count is empty.

func (*Count) UnmarshalYAML added in v0.4.0

func (c *Count) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML overrides the default YAML unmarshaling logic for the Count struct, allowing it to perform more complex unmarshaling behavior. This method implements the yaml.Unmarshaler (v3) interface.

type DeadLetterQueue added in v1.9.0

type DeadLetterQueue struct {
	Tries *uint16 `yaml:"tries"`
}

DeadLetterQueue represents the configurable options for setting up a Dead-Letter Queue.

func (*DeadLetterQueue) IsEmpty added in v1.11.0

func (q *DeadLetterQueue) IsEmpty() bool

IsEmpty returns empty if the struct has all zero members.

type DependsOn added in v1.11.0

type DependsOn map[string]string

DependsOn represents container dependency for a container.

type Deployment added in v1.18.0

type Deployment struct {
	StackName      string   `yaml:"stack_name"`
	TemplatePath   string   `yaml:"template_path"`
	TemplateConfig string   `yaml:"template_config"`
	DependsOn      []string `yaml:"depends_on"`
}

Deployment is a cloudformation stack deployment configuration.

type DeploymentConfig added in v1.26.0

type DeploymentConfig struct {
	DeploymentControllerConfig `yaml:",inline"`
	RollbackAlarms             Union[[]string, AlarmArgs] `yaml:"rollback_alarms"`
}

DeploymentConfig represents the deployment config for an ECS service.

type DeploymentControllerConfig added in v1.26.0

type DeploymentControllerConfig struct {
	Rolling *string `yaml:"rolling"`
}

DeploymentControllerConfig represents deployment strategies for a service.

type Deployments added in v1.18.0

type Deployments map[string]*Deployment

Deployments represent a directed graph of cloudformation deployments.

type DeprecatedALBSecurityGroupsConfig added in v1.23.0

type DeprecatedALBSecurityGroupsConfig struct {
	DeprecatedIngress DeprecatedIngress `yaml:"ingress"` // Deprecated. This field is now available inside PublicHTTPConfig.Ingress and privateHTTPConfig.Ingress field.
}

DeprecatedALBSecurityGroupsConfig represents security group configuration settings for an ALB.

func (DeprecatedALBSecurityGroupsConfig) IsEmpty added in v1.23.0

IsEmpty returns true if there are no specified fields for ingress.

type DeprecatedIngress added in v1.23.0

type DeprecatedIngress struct {
	RestrictiveIngress RestrictiveIngress `yaml:"restrict_to"` // Deprecated. This field is no more available in any other field.
	VPCIngress         *bool              `yaml:"from_vpc"`    //Deprecated. This field is now available in privateHTTPConfig.Ingress.VPCIngress
}

DeprecatedIngress represents allowed ingress traffic from specified fields.

func (DeprecatedIngress) IsEmpty added in v1.23.0

func (i DeprecatedIngress) IsEmpty() bool

IsEmpty returns true if there are no specified fields for ingress.

type DockerBuildArgs added in v0.3.0

type DockerBuildArgs struct {
	Context    *string           `yaml:"context,omitempty"`
	Dockerfile *string           `yaml:"dockerfile,omitempty"`
	Args       map[string]string `yaml:"args,omitempty"`
	Target     *string           `yaml:"target,omitempty"`
	CacheFrom  []string          `yaml:"cache_from,omitempty"`
}

DockerBuildArgs represents the options specifiable under the "build" field of Docker Compose services. For more information, see: https://docs.docker.com/compose/compose-file/build

type DynamicWorkload added in v1.21.0

type DynamicWorkload interface {
	ApplyEnv(envName string) (DynamicWorkload, error)
	Validate() error
	RequiredEnvironmentFeatures() []string
	Load(sess *session.Session) error
	Manifest() any
}

DynamicWorkload represents a dynamically populated workload.

func UnmarshalWorkload added in v0.4.0

func UnmarshalWorkload(in []byte) (DynamicWorkload, error)

UnmarshalWorkload deserializes the YAML input stream into a workload manifest object. If an error occurs during deserialization, then returns the error. If the workload type in the manifest is invalid, then returns an ErrInvalidmanifestinfo.

type DynamicWorkloadManifest added in v1.21.0

type DynamicWorkloadManifest struct {
	// contains filtered or unexported fields
}

DynamicWorkloadManifest represents a dynamically populated workload manifest.

func (DynamicWorkloadManifest) ApplyEnv added in v1.21.0

func (s DynamicWorkloadManifest) ApplyEnv(envName string) (DynamicWorkload, error)

ApplyEnv returns the workload manifest with environment overrides. If the environment passed in does not have any overrides then it returns itself.

func (*DynamicWorkloadManifest) Load added in v1.21.0

Load dynamically populates all fields in the manifest.

func (*DynamicWorkloadManifest) Manifest added in v1.21.0

func (s *DynamicWorkloadManifest) Manifest() any

Manifest returns the manifest content.

func (*DynamicWorkloadManifest) RequiredEnvironmentFeatures added in v1.21.0

func (s *DynamicWorkloadManifest) RequiredEnvironmentFeatures() []string

RequiredEnvironmentFeatures returns environment features that are required for this manifest.

func (*DynamicWorkloadManifest) Validate added in v1.21.0

func (l *DynamicWorkloadManifest) Validate() error

Validate returns nil if DynamicLoadBalancedWebService is configured correctly.

type EFSConfigOrBool added in v1.6.0

type EFSConfigOrBool struct {
	Advanced EFSVolumeConfiguration
	Enabled  *bool
}

EFSConfigOrBool contains custom unmarshaling logic for the `efs` field in the manifest.

func (*EFSConfigOrBool) Disabled added in v1.6.0

func (e *EFSConfigOrBool) Disabled() bool

Disabled returns true if Enabled is explicitly set to false. This function is useful for checking that the EFS config has been intentionally turned off and whether we should ignore any values of the struct which have been populated erroneously.

func (*EFSConfigOrBool) IsEmpty added in v1.11.0

func (e *EFSConfigOrBool) IsEmpty() bool

IsEmpty returns empty if the struct has all zero members.

func (*EFSConfigOrBool) UnmarshalYAML added in v1.6.0

func (e *EFSConfigOrBool) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML implements the yaml(v3) interface. It allows EFS to be specified as a string or a struct alternately.

func (*EFSConfigOrBool) UseManagedFS added in v1.6.0

func (e *EFSConfigOrBool) UseManagedFS() bool

UseManagedFS returns true if the user has specified EFS as a bool, or has only specified UID and GID.

type EFSVolumeConfiguration added in v1.2.0

type EFSVolumeConfiguration struct {
	FileSystemID  StringOrFromCFN     `yaml:"id"`       // Required. Can be specified as "copilot" or "managed" magic keys.
	RootDirectory *string             `yaml:"root_dir"` // Default "/". For BYO EFS.
	AuthConfig    AuthorizationConfig `yaml:"auth"`     // Auth config for BYO EFS.
	UID           *uint32             `yaml:"uid"`      // UID for managed EFS.
	GID           *uint32             `yaml:"gid"`      // GID for managed EFS.
}

EFSVolumeConfiguration holds options which tell ECS how to reach out to the EFS filesystem.

func (*EFSVolumeConfiguration) EmptyBYOConfig added in v1.6.0

func (e *EFSVolumeConfiguration) EmptyBYOConfig() bool

EmptyBYOConfig returns true if the `id`, `root_directory`, and `auth` fields are all empty. This would mean that no custom EFS information has been specified.

func (*EFSVolumeConfiguration) EmptyUIDConfig added in v1.6.0

func (e *EFSVolumeConfiguration) EmptyUIDConfig() bool

EmptyUIDConfig returns true if the `uid` and `gid` fields are empty. These fields are mutually exclusive with BYO EFS. If they are nonempty, then we should use managed EFS instead.

func (*EFSVolumeConfiguration) IsEmpty added in v1.6.0

func (e *EFSVolumeConfiguration) IsEmpty() bool

IsEmpty returns empty if the struct has all zero members.

type ELBAccessLogsArgs added in v1.21.0

type ELBAccessLogsArgs struct {
	BucketName *string `yaml:"bucket_name,omitempty"`
	Prefix     *string `yaml:"prefix,omitempty"`
}

ELBAccessLogsArgs holds the access logs configuration.

type ELBAccessLogsArgsOrBool added in v1.21.0

type ELBAccessLogsArgsOrBool struct {
	Enabled        *bool
	AdvancedConfig ELBAccessLogsArgs
}

ELBAccessLogsArgsOrBool is a custom type which supports unmarshaling yaml which can either be of type bool or type ELBAccessLogsArgs.

func (*ELBAccessLogsArgsOrBool) UnmarshalYAML added in v1.21.0

func (al *ELBAccessLogsArgsOrBool) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML overrides the default YAML unmarshaling logic for the ELBAccessLogsArgsOrBool struct, allowing it to perform more complex unmarshaling behavior. This method implements the yaml.Unmarshaler (v3) interface.

type EntryPointOverride added in v1.3.0

type EntryPointOverride stringSliceOrShellString

EntryPointOverride is a custom type which supports unmarshalling "entrypoint" yaml which can either be of type string or type slice of string.

func (*EntryPointOverride) ToStringSlice added in v1.4.0

func (e *EntryPointOverride) ToStringSlice() ([]string, error)

ToStringSlice converts an EntryPointOverride to a slice of string using shell-style rules.

func (*EntryPointOverride) UnmarshalYAML added in v1.3.0

func (e *EntryPointOverride) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML overrides the default YAML unmarshalling logic for the EntryPointOverride struct, allowing it to be unmarshalled into a string slice or a string. This method implements the yaml.Unmarshaler (v3) interface.

type Environment added in v1.18.0

type Environment struct {
	Workload          `yaml:",inline"`
	EnvironmentConfig `yaml:",inline"`
	// contains filtered or unexported fields
}

Environment is the manifest configuration for an environment.

func FromEnvConfig added in v1.19.0

func FromEnvConfig(cfg *config.Environment, parser template.Parser) *Environment

FromEnvConfig transforms an environment configuration into a manifest.

func NewEnvironment added in v1.20.0

func NewEnvironment(props *EnvironmentProps) *Environment

NewEnvironment creates a new environment manifest object.

func UnmarshalEnvironment added in v1.19.0

func UnmarshalEnvironment(in []byte) (*Environment, error)

UnmarshalEnvironment deserializes the YAML input stream into an environment manifest object. If an error occurs during deserialization, then returns the error.

func (*Environment) MarshalBinary added in v1.20.0

func (e *Environment) MarshalBinary() ([]byte, error)

MarshalBinary serializes the manifest object into a binary YAML document. Implements the encoding.BinaryMarshaler interface.

func (Environment) Validate added in v1.18.0

func (e Environment) Validate() error

Validate returns nil if Environment is configured correctly.

type EnvironmentCDNConfig added in v1.22.0

type EnvironmentCDNConfig struct {
	Enabled *bool
	Config  AdvancedCDNConfig // mutually exclusive with Enabled
}

EnvironmentCDNConfig represents configuration of a CDN.

func (*EnvironmentCDNConfig) IsEmpty added in v1.22.0

func (cfg *EnvironmentCDNConfig) IsEmpty() bool

IsEmpty returns whether environmentCDNConfig is empty.

func (*EnvironmentCDNConfig) UnmarshalYAML added in v1.22.0

func (cfg *EnvironmentCDNConfig) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML overrides the default YAML unmarshaling logic for the environmentCDNConfig struct, allowing it to perform more complex unmarshaling behavior. This method implements the yaml.Unmarshaler (v3) interface.

type EnvironmentConfig added in v1.18.0

type EnvironmentConfig struct {
	Network       environmentNetworkConfig `yaml:"network,omitempty,flow"`
	Observability environmentObservability `yaml:"observability,omitempty,flow"`
	HTTPConfig    EnvironmentHTTPConfig    `yaml:"http,omitempty,flow"`
	CDNConfig     EnvironmentCDNConfig     `yaml:"cdn,omitempty,flow"`
}

EnvironmentConfig defines the configuration settings for an environment manifest

func (*EnvironmentConfig) CDNDoesTLSTermination added in v1.22.0

func (cfg *EnvironmentConfig) CDNDoesTLSTermination() bool

CDNDoesTLSTermination returns true when the environment's CDN is configured to terminate incoming TLS connections.

func (*EnvironmentConfig) CDNEnabled added in v1.21.0

func (cfg *EnvironmentConfig) CDNEnabled() bool

CDNEnabled returns whether a CDN configuration has been enabled in the environment manifest.

func (*EnvironmentConfig) ELBAccessLogs added in v1.21.0

func (cfg *EnvironmentConfig) ELBAccessLogs() (*ELBAccessLogsArgs, bool)

ELBAccessLogs returns the access logs config if the user has set any values. If there is no access logs settings, then returns nil and false.

func (*EnvironmentConfig) EnvSecurityGroup added in v1.21.0

func (cfg *EnvironmentConfig) EnvSecurityGroup() (*securityGroupConfig, bool)

EnvSecurityGroup returns the security group config if the user has set any values. If there is no env security group settings, then returns nil and false.

func (*EnvironmentConfig) GetPublicALBSourceIPs added in v1.23.0

func (mft *EnvironmentConfig) GetPublicALBSourceIPs() []IPNet

GetPublicALBSourceIPs returns list of IPNet.

func (*EnvironmentConfig) HasImportedPublicALBCerts added in v1.22.0

func (cfg *EnvironmentConfig) HasImportedPublicALBCerts() bool

HasImportedPublicALBCerts returns true when the environment's ALB is configured with certs for the public listener.

func (*EnvironmentConfig) IsPublicLBIngressRestrictedToCDN added in v1.23.0

func (mft *EnvironmentConfig) IsPublicLBIngressRestrictedToCDN() bool

IsPublicLBIngressRestrictedToCDN returns whether an environment has its Public Load Balancer ingress restricted to a Content Delivery Network.

type EnvironmentHTTPConfig added in v1.21.0

type EnvironmentHTTPConfig struct {
	Public  PublicHTTPConfig  `yaml:"public,omitempty"`
	Private privateHTTPConfig `yaml:"private,omitempty"`
}

EnvironmentHTTPConfig defines the configuration settings for an environment group's HTTP connections.

func (EnvironmentHTTPConfig) IsEmpty added in v1.21.0

func (cfg EnvironmentHTTPConfig) IsEmpty() bool

IsEmpty returns true if neither the public ALB nor the internal ALB is configured.

type EnvironmentProps added in v1.20.0

type EnvironmentProps struct {
	Name         string
	CustomConfig *config.CustomizeEnv
	Telemetry    *config.Telemetry
}

EnvironmentProps contains properties for creating a new environment manifest.

type ErrInvalidPipelineManifestVersion

type ErrInvalidPipelineManifestVersion struct {
	// contains filtered or unexported fields
}

ErrInvalidPipelineManifestVersion occurs when the pipeline.yml/manifest.yml file contains invalid schema version during unmarshalling.

func (*ErrInvalidPipelineManifestVersion) Error

func (*ErrInvalidPipelineManifestVersion) Is

Is compares the 2 errors. Only returns true if the errors are of the same type and contain the same information.

type ErrInvalidWorkloadType added in v0.4.0

type ErrInvalidWorkloadType struct {
	Type string
}

ErrInvalidWorkloadType occurs when a user requested a manifest template type that doesn't exist.

func (*ErrInvalidWorkloadType) Error added in v0.4.0

func (e *ErrInvalidWorkloadType) Error() string

type ErrUnknownProvider

type ErrUnknownProvider struct {
	// contains filtered or unexported fields
}

ErrUnknownProvider occurs CreateProvider() is called with configurations that do not map to any supported provider.

func (*ErrUnknownProvider) Error

func (e *ErrUnknownProvider) Error() string

func (*ErrUnknownProvider) Is

func (e *ErrUnknownProvider) Is(target error) bool

Is compares the 2 errors. Returns true if the errors are of the same type

type ExecuteCommand added in v1.4.0

type ExecuteCommand struct {
	Enable *bool
	Config ExecuteCommandConfig
}

ExecuteCommand is a custom type which supports unmarshaling yaml which can either be of type bool or type ExecuteCommandConfig.

func (*ExecuteCommand) UnmarshalYAML added in v1.4.0

func (e *ExecuteCommand) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML overrides the default YAML unmarshaling logic for the ExecuteCommand struct, allowing it to perform more complex unmarshaling behavior. This method implements the yaml.Unmarshaler (v3) interface.

type ExecuteCommandConfig added in v1.4.0

type ExecuteCommandConfig struct {
	Enable *bool `yaml:"enable"`
}

ExecuteCommandConfig represents the configuration for ECS Execute Command.

func (ExecuteCommandConfig) IsEmpty added in v1.4.0

func (e ExecuteCommandConfig) IsEmpty() bool

IsEmpty returns whether ExecuteCommandConfig is empty.

type ExposedPort added in v1.25.0

type ExposedPort struct {
	ContainerName string // The name of the container that exposes this port.
	Port          uint16 // The port number.
	Protocol      string // Either "tcp" or "udp", empty means the default value that the underlying service provides.
	// contains filtered or unexported fields
}

ExposedPort will hold the port mapping configuration.

type ExposedPortsIndex added in v1.26.0

type ExposedPortsIndex struct {
	WorkloadName      string                   // holds name of the main container
	PortsForContainer map[string][]ExposedPort // holds exposed ports list for all the containers
	ContainerForPort  map[uint16]string        // holds port to container mapping
}

ExposedPortsIndex holds exposed ports configuration.

type FIFOAdvanceConfig added in v1.22.0

type FIFOAdvanceConfig struct {
	ContentBasedDeduplication *bool   `yaml:"content_based_deduplication"`
	DeduplicationScope        *string `yaml:"deduplication_scope"`
	FIFOThroughputLimit       *string `yaml:"throughput_limit"`
	HighThroughputFifo        *bool   `yaml:"high_throughput"`
}

FIFOAdvanceConfig represents the advanced fifo queue config.

func (*FIFOAdvanceConfig) IsEmpty added in v1.22.0

func (f *FIFOAdvanceConfig) IsEmpty() bool

IsEmpty returns true if the FifoAdvanceConfig struct has all nil values.

type FIFOAdvanceConfigOrBool added in v1.22.0

type FIFOAdvanceConfigOrBool struct {
	Enable   *bool
	Advanced FIFOAdvanceConfig
}

FIFOAdvanceConfigOrBool represents the configurable options for fifo queues.

func (*FIFOAdvanceConfigOrBool) IsEmpty added in v1.22.0

func (f *FIFOAdvanceConfigOrBool) IsEmpty() bool

IsEmpty returns true if the FifoAdvanceConfigOrBool struct has all nil values.

func (*FIFOAdvanceConfigOrBool) IsEnabled added in v1.22.0

func (f *FIFOAdvanceConfigOrBool) IsEnabled() bool

IsEnabled returns true if the FifoAdvanceConfigOrBool struct has all nil values.

func (*FIFOAdvanceConfigOrBool) UnmarshalYAML added in v1.22.0

func (t *FIFOAdvanceConfigOrBool) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML overrides the default YAML unmarshaling logic for the FifoAdvanceConfigOrBool struct, allowing it to perform more complex unmarshaling behavior. This method implements the yaml.Unmarshaler (v3) interface.

type FIFOTopicAdvanceConfig added in v1.22.0

type FIFOTopicAdvanceConfig struct {
	ContentBasedDeduplication *bool `yaml:"content_based_deduplication"`
}

FIFOTopicAdvanceConfig represents the advanced fifo topic config.

func (*FIFOTopicAdvanceConfig) IsEmpty added in v1.22.0

func (a *FIFOTopicAdvanceConfig) IsEmpty() bool

IsEmpty returns true if the FifoAdvanceConfig struct has all nil values.

type FIFOTopicAdvanceConfigOrBool added in v1.22.0

type FIFOTopicAdvanceConfigOrBool struct {
	Enable   *bool
	Advanced FIFOTopicAdvanceConfig
}

FIFOTopicAdvanceConfigOrBool represents the configurable options for fifo topics.

func (*FIFOTopicAdvanceConfigOrBool) IsEmpty added in v1.22.0

func (f *FIFOTopicAdvanceConfigOrBool) IsEmpty() bool

IsEmpty returns true if the FifoAdvanceConfigOrBool struct has all nil values.

func (*FIFOTopicAdvanceConfigOrBool) IsEnabled added in v1.22.0

func (f *FIFOTopicAdvanceConfigOrBool) IsEnabled() bool

IsEnabled returns true if the FIFO is enabled on the SQS queue.

func (*FIFOTopicAdvanceConfigOrBool) UnmarshalYAML added in v1.22.0

func (t *FIFOTopicAdvanceConfigOrBool) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML overrides the default YAML unmarshaling logic for the FIFOTopicAdvanceConfigOrBool struct, allowing it to perform more complex unmarshaling behavior. This method implements the yaml.Unmarshaler (v3) interface.

type FileUpload added in v1.26.0

type FileUpload struct {
	Source      string              `yaml:"source"`
	Destination string              `yaml:"destination"`
	Recursive   bool                `yaml:"recursive"`
	Exclude     StringSliceOrString `yaml:"exclude"`
	Reinclude   StringSliceOrString `yaml:"reinclude"`
}

FileUpload represents the options for file uploading.

type GitHubProperties

type GitHubProperties struct {
	RepositoryURL string `structs:"repository" yaml:"repository"`
	Branch        string `structs:"branch" yaml:"branch"`
}

GitHubProperties contains information for configuring a GitHubv2 source provider.

type GitHubV1Properties added in v1.4.0

type GitHubV1Properties struct {
	// use tag from https://godoc.org/github.com/fatih/structs#example-Map--Tags
	// to specify the name of the field in the output properties
	RepositoryURL         string `structs:"repository" yaml:"repository"`
	Branch                string `structs:"branch" yaml:"branch"`
	GithubSecretIdKeyName string `structs:"access_token_secret" yaml:"access_token_secret"`
}

GitHubV1Properties contain information for configuring a Githubv1 source provider.

type HTTP added in v1.27.0

type HTTP struct {
	ImportedALB              *string       `yaml:"alb"`
	Main                     RoutingRule   `yaml:",inline"`
	TargetContainerCamelCase *string       `yaml:"targetContainer"` // Deprecated. Maintained for backwards compatibility, use [RoutingRule.TargetContainer] instead.
	AdditionalRoutingRules   []RoutingRule `yaml:"additional_rules"`
}

HTTP holds options for application load balancer.

func (*HTTP) IsEmpty added in v1.27.0

func (r *HTTP) IsEmpty() bool

IsEmpty returns true if HTTP has empty configuration.

func (HTTP) RoutingRules added in v1.27.0

func (cfg HTTP) RoutingRules() []RoutingRule

RoutingRules returns main as well as additional routing rules as a list of RoutingRule.

type HTTPHealthCheckArgs added in v0.6.0

type HTTPHealthCheckArgs struct {
	Path               *string        `yaml:"path"`
	Port               *int           `yaml:"port"`
	SuccessCodes       *string        `yaml:"success_codes"`
	HealthyThreshold   *int64         `yaml:"healthy_threshold"`
	UnhealthyThreshold *int64         `yaml:"unhealthy_threshold"`
	Timeout            *time.Duration `yaml:"timeout"`
	Interval           *time.Duration `yaml:"interval"`
	GracePeriod        *time.Duration `yaml:"grace_period"`
}

HTTPHealthCheckArgs holds the configuration to determine if the load balanced web service is healthy. These options are specifiable under the "healthcheck" field. See https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-targetgroup.html.

type HTTPOrBool added in v1.27.0

type HTTPOrBool struct {
	HTTP
	Enabled *bool
}

HTTPOrBool holds advanced configuration for routing rule or a boolean switch.

func (*HTTPOrBool) Disabled added in v1.27.0

func (r *HTTPOrBool) Disabled() bool

Disabled returns true if the routing rule configuration is explicitly disabled.

func (*HTTPOrBool) UnmarshalYAML added in v1.27.0

func (r *HTTPOrBool) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML implements the yaml(v3) interface. It allows https routing rule to be specified as a bool or a struct alternately.

type HealthCheckArgsOrString added in v0.6.0

type HealthCheckArgsOrString struct {
	Union[string, HTTPHealthCheckArgs]
}

HealthCheckArgsOrString is a custom type which supports unmarshaling yaml which can either be of type string or type HealthCheckArgs.

func (*HealthCheckArgsOrString) Path added in v1.7.0

func (hc *HealthCheckArgsOrString) Path() *string

Path returns the default health check path if provided otherwise, returns the path from the advanced configuration.

type IPNet added in v1.11.0

type IPNet string

IPNet represents an IP network string. For example: 10.1.0.0/16

type Image added in v0.4.0

type Image struct {
	ImageLocationOrBuild `yaml:",inline"`
	Credentials          *string           `yaml:"credentials"`     // ARN of the secret containing the private repository credentials.
	DockerLabels         map[string]string `yaml:"labels,flow"`     // Apply Docker labels to the container at runtime.
	DependsOn            DependsOn         `yaml:"depends_on,flow"` // Add any sidecar dependencies.
}

Image represents the workload's container image.

func (Image) GetLocation added in v0.5.0

func (i Image) GetLocation() string

GetLocation returns the location of the image.

func (*Image) UnmarshalYAML added in v1.11.0

func (i *Image) 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 ImageLocationOrBuild added in v1.26.0

type ImageLocationOrBuild struct {
	Build    BuildArgsOrString `yaml:"build"`    // Build an image from a Dockerfile.
	Location *string           `yaml:"location"` // Use an existing image instead.
}

ImageLocationOrBuild represents the docker build arguments and location of the existing image.

func (*ImageLocationOrBuild) BuildConfig added in v1.26.0

func (i *ImageLocationOrBuild) BuildConfig(rootDirectory string) *DockerBuildArgs

BuildConfig populates a docker.BuildArguments struct from the fields available in the manifest. Prefer the following hierarchy: 1. Specific dockerfile, specific context 2. Specific dockerfile, context = dockerfile dir 3. "Dockerfile" located in context dir 4. "Dockerfile" located in ws root.

type ImageOverride added in v1.3.0

type ImageOverride struct {
	EntryPoint EntryPointOverride `yaml:"entrypoint"`
	Command    CommandOverride    `yaml:"command"`
}

ImageOverride holds fields that override Dockerfile image defaults.

type ImageWithHealthcheck added in v1.8.0

type ImageWithHealthcheck struct {
	Image       Image                `yaml:",inline"`
	HealthCheck ContainerHealthCheck `yaml:"healthcheck"`
}

ImageWithHealthcheck represents a container image with health check.

type ImageWithHealthcheckAndOptionalPort added in v1.11.0

type ImageWithHealthcheckAndOptionalPort struct {
	ImageWithOptionalPort `yaml:",inline"`
	HealthCheck           ContainerHealthCheck `yaml:"healthcheck"`
}

ImageWithHealthcheckAndOptionalPort represents a container image with an optional exposed port and health check.

type ImageWithOptionalPort added in v1.11.0

type ImageWithOptionalPort struct {
	Image Image   `yaml:",inline"`
	Port  *uint16 `yaml:"port"`
}

ImageWithOptionalPort represents a container image with an optional exposed port.

type ImageWithPort added in v1.7.0

type ImageWithPort struct {
	Image Image   `yaml:",inline"`
	Port  *uint16 `yaml:"port"`
}

ImageWithPort represents a container image with an exposed port.

type ImageWithPortAndHealthcheck added in v1.8.0

type ImageWithPortAndHealthcheck struct {
	ImageWithPort `yaml:",inline"`
	HealthCheck   ContainerHealthCheck `yaml:"healthcheck"`
}

ImageWithPortAndHealthcheck represents a container image with an exposed port and health check.

type IntRangeBand added in v1.6.0

type IntRangeBand string

IntRangeBand is a number range with maximum and minimum values.

func (IntRangeBand) Parse added in v1.6.0

func (r IntRangeBand) Parse() (min int, max int, err error)

Parse parses Range string and returns the min and max values. For example: 1-100 returns 1 and 100.

type Interpolator added in v1.12.0

type Interpolator struct {
	// contains filtered or unexported fields
}

Interpolator substitutes variables in a manifest.

func NewInterpolator added in v1.12.0

func NewInterpolator(appName, envName string) *Interpolator

NewInterpolator initiates a new Interpolator.

func (*Interpolator) Interpolate added in v1.12.0

func (i *Interpolator) Interpolate(s string) (string, error)

Interpolate substitutes environment variables in a string.

type JobFailureHandlerConfig added in v0.5.0

type JobFailureHandlerConfig struct {
	Timeout *string `yaml:"timeout"`
	Retries *int    `yaml:"retries"`
}

JobFailureHandlerConfig represents the error handling configuration for the job.

type JobTriggerConfig added in v0.5.0

type JobTriggerConfig struct {
	Schedule *string `yaml:"schedule"`
}

JobTriggerConfig represents the configuration for the event that triggers the job.

type LoadBalancedWebService

type LoadBalancedWebService struct {
	Workload                     `yaml:",inline"`
	LoadBalancedWebServiceConfig `yaml:",inline"`
	// Use *LoadBalancedWebServiceConfig because of https://github.com/imdario/mergo/issues/146
	Environments map[string]*LoadBalancedWebServiceConfig `yaml:",flow"` // Fields to override per environment.
	// contains filtered or unexported fields
}

LoadBalancedWebService holds the configuration to build a container image with an exposed port that receives requests through a load balancer with AWS Fargate as the compute engine.

func NewLoadBalancedWebService

func NewLoadBalancedWebService(props *LoadBalancedWebServiceProps) *LoadBalancedWebService

NewLoadBalancedWebService creates a new public load balanced web service, receives all the requests from the load balancer, has a single task with minimal CPU and memory thresholds, and sets the default health check path to "/".

func (*LoadBalancedWebService) BuildArgs added in v0.3.0

func (s *LoadBalancedWebService) BuildArgs(contextDir string) (map[string]*DockerBuildArgs, error)

BuildArgs returns a docker.BuildArguments object given a context directory.

func (*LoadBalancedWebService) ContainerDependencies added in v1.32.1

func (s *LoadBalancedWebService) ContainerDependencies() map[string]ContainerDependency

ContainerDependencies returns a map of ContainerDependency objects for the LoadBalancedWebService including dependencies for its main container, any logging sidecar, and additional sidecars.

func (*LoadBalancedWebService) Dockerfile added in v1.33.0

func (s *LoadBalancedWebService) Dockerfile() string

Dockerfile returns the relative path of the Dockerfile in the manifest.

func (*LoadBalancedWebService) EnvFiles added in v1.27.0

func (s *LoadBalancedWebService) EnvFiles() map[string]string

EnvFiles returns the locations of all env files against the ws root directory. This method returns a map[string]string where the keys are container names and the values are either env file paths or empty strings.

func (*LoadBalancedWebService) ExposedPorts added in v1.25.0

func (lbws *LoadBalancedWebService) ExposedPorts() (ExposedPortsIndex, error)

ExposedPorts returns all the ports that are container ports available to receive traffic.

func (*LoadBalancedWebService) MainContainerPort added in v1.26.0

func (s *LoadBalancedWebService) MainContainerPort() string

MainContainerPort returns the main container port.

func (*LoadBalancedWebService) MarshalBinary

func (s *LoadBalancedWebService) MarshalBinary() ([]byte, error)

MarshalBinary serializes the manifest object into a binary YAML document. Implements the encoding.BinaryMarshaler interface.

func (*LoadBalancedWebService) Port added in v1.10.0

func (s *LoadBalancedWebService) Port() (port uint16, ok bool)

Port returns the exposed port in the manifest. A LoadBalancedWebService always has a port exposed therefore the boolean is always true.

func (*LoadBalancedWebService) Publish added in v1.10.0

func (s *LoadBalancedWebService) Publish() []Topic

Publish returns the list of topics where notifications can be published.

func (*LoadBalancedWebService) ServiceConnectTarget added in v1.31.0

func (l *LoadBalancedWebService) ServiceConnectTarget(exposedPorts ExposedPortsIndex) *ServiceConnectTargetContainer

ServiceConnectTarget returns the target container, port, and protocol to be exposed for ServiceConnect.

type LoadBalancedWebServiceConfig

type LoadBalancedWebServiceConfig struct {
	ImageConfig      ImageWithPortAndHealthcheck `yaml:"image,flow"`
	ImageOverride    `yaml:",inline"`
	HTTPOrBool       HTTPOrBool `yaml:"http,flow"`
	TaskConfig       `yaml:",inline"`
	Logging          `yaml:"logging,flow"`
	Sidecars         map[string]*SidecarConfig        `yaml:"sidecars"` // NOTE: keep the pointers because `mergo` doesn't automatically deep merge map's value unless it's a pointer type.
	Network          NetworkConfig                    `yaml:"network"`
	PublishConfig    PublishConfig                    `yaml:"publish"`
	TaskDefOverrides []OverrideRule                   `yaml:"taskdef_overrides"`
	NLBConfig        NetworkLoadBalancerConfiguration `yaml:"nlb"`
	DeployConfig     DeploymentConfig                 `yaml:"deployment"`
	Observability    Observability                    `yaml:"observability"`
}

LoadBalancedWebServiceConfig holds the configuration for a load balanced web service.

type LoadBalancedWebServiceProps

type LoadBalancedWebServiceProps struct {
	*WorkloadProps
	Path string
	Port uint16

	HealthCheck ContainerHealthCheck // Optional healthcheck configuration.
	Platform    PlatformArgsOrString // Optional platform configuration.
}

LoadBalancedWebServiceProps contains properties for creating a new load balanced fargate service manifest.

type Logging added in v0.4.0

type Logging struct {
	Retention      *int                `yaml:"retention"`
	Image          *string             `yaml:"image"`
	Destination    map[string]string   `yaml:"destination,flow"`
	EnableMetadata *bool               `yaml:"enableMetadata"`
	SecretOptions  map[string]Secret   `yaml:"secretOptions"`
	ConfigFile     *string             `yaml:"configFilePath"`
	Variables      map[string]Variable `yaml:"variables"`
	Secrets        map[string]Secret   `yaml:"secrets"`
	EnvFile        *string             `yaml:"env_file"`
}

Logging holds configuration for Firelens to route your logs.

func (*Logging) GetEnableMetadata added in v1.2.0

func (lc *Logging) GetEnableMetadata() *string

GetEnableMetadata returns the configuration values and sane default for the EnableMEtadata field

func (*Logging) IsEmpty added in v1.11.0

func (lc *Logging) IsEmpty() bool

IsEmpty returns empty if the struct has all zero members.

func (*Logging) LogImage added in v1.2.0

func (lc *Logging) LogImage() *string

LogImage returns the default Fluent Bit image if not otherwise configured.

type MountPointOpts added in v1.2.0

type MountPointOpts struct {
	ContainerPath *string `yaml:"path"`
	ReadOnly      *bool   `yaml:"read_only"`
}

MountPointOpts is shared between Volumes for the main container and MountPoints for sidecars.

type NLBHealthCheckArgs added in v1.14.0

type NLBHealthCheckArgs struct {
	Port               *int           `yaml:"port"`
	HealthyThreshold   *int64         `yaml:"healthy_threshold"`
	UnhealthyThreshold *int64         `yaml:"unhealthy_threshold"`
	Timeout            *time.Duration `yaml:"timeout"`
	Interval           *time.Duration `yaml:"interval"`
	GracePeriod        *time.Duration `yaml:"grace_period"`
}

NLBHealthCheckArgs holds the configuration to determine if the network load balanced web service is healthy. These options are specifiable under the "healthcheck" field. See https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-targetgroup.html.

type NetworkConfig added in v1.3.0

type NetworkConfig struct {
	VPC     vpcConfig                `yaml:"vpc"`
	Connect ServiceConnectBoolOrArgs `yaml:"connect"`
}

NetworkConfig represents options for network connection to AWS resources within a VPC.

func (*NetworkConfig) IsEmpty added in v1.11.0

func (c *NetworkConfig) IsEmpty() bool

IsEmpty returns empty if the struct has all zero members.

type NetworkLoadBalancerConfiguration added in v1.13.0

type NetworkLoadBalancerConfiguration struct {
	Listener            NetworkLoadBalancerListener   `yaml:",inline"`
	Aliases             Alias                         `yaml:"alias"`
	AdditionalListeners []NetworkLoadBalancerListener `yaml:"additional_listeners"`
}

NetworkLoadBalancerConfiguration holds options for a network load balancer.

func (*NetworkLoadBalancerConfiguration) IsEmpty added in v1.13.0

IsEmpty returns true if NetworkLoadBalancerConfiguration is empty.

func (NetworkLoadBalancerConfiguration) NLBListeners added in v1.27.0

NLBListeners returns main as well as additional listeners as a list of NetworkLoadBalancerListener.

type NetworkLoadBalancerListener added in v1.27.0

type NetworkLoadBalancerListener struct {
	Port                *string            `yaml:"port"`
	HealthCheck         NLBHealthCheckArgs `yaml:"healthcheck"`
	TargetContainer     *string            `yaml:"target_container"`
	TargetPort          *int               `yaml:"target_port"`
	SSLPolicy           *string            `yaml:"ssl_policy"`
	Stickiness          *bool              `yaml:"stickiness"`
	DeregistrationDelay *time.Duration     `yaml:"deregistration_delay"`
}

NetworkLoadBalancerListener holds listener configuration for NLB.

func (NetworkLoadBalancerListener) HealthCheckPort added in v1.31.0

func (listener NetworkLoadBalancerListener) HealthCheckPort(mainContainerPort *uint16) (uint16, error)

HealthCheckPort returns the port a HealthCheck is set to for a NetworkLoadBalancerListener.

func (*NetworkLoadBalancerListener) IsEmpty added in v1.27.0

func (c *NetworkLoadBalancerListener) IsEmpty() bool

IsEmpty returns true if NetworkLoadBalancerListener is empty.

func (NetworkLoadBalancerListener) Target added in v1.27.0

func (listener NetworkLoadBalancerListener) Target(exposedPorts ExposedPortsIndex) (targetContainer string, targetPort string, err error)

Target returns target container and target port for a NLB listener configuration.

type Observability added in v1.16.0

type Observability struct {
	Tracing *string `yaml:"tracing"`
}

Observability holds configuration for observability to the service.

type OverrideRule added in v1.10.0

type OverrideRule struct {
	Path  string    `yaml:"path"`
	Value yaml.Node `yaml:"value"`
}

OverrideRule holds the manifest overriding rule for CloudFormation template.

type Percentage added in v1.11.0

type Percentage int

Percentage represents a valid percentage integer ranging from 0 to 100.

type Pipeline added in v1.16.0

type Pipeline struct {
	// Name of the pipeline
	Name    string                     `yaml:"name"`
	Version PipelineSchemaMajorVersion `yaml:"version"`
	Source  *Source                    `yaml:"source"`
	Build   *Build                     `yaml:"build"`
	Stages  []PipelineStage            `yaml:"stages"`
	// contains filtered or unexported fields
}

Pipeline contains information that defines the relationship and deployment ordering of your environments.

func NewPipeline added in v1.16.0

func NewPipeline(pipelineName string, provider Provider, stages []PipelineStage) (*Pipeline, error)

NewPipeline returns a pipeline manifest object.

func UnmarshalPipeline

func UnmarshalPipeline(in []byte) (*Pipeline, error)

UnmarshalPipeline deserializes the YAML input stream into a pipeline manifest object. It returns an error if any issue occurs during deserialization or the YAML input contains invalid fields.

func (*Pipeline) MarshalBinary added in v1.16.0

func (m *Pipeline) MarshalBinary() ([]byte, error)

MarshalBinary serializes the pipeline manifest object into byte array that represents the pipeline.yml document.

func (Pipeline) Validate added in v1.16.0

func (p Pipeline) Validate() error

Validate returns nil if the pipeline manifest is configured correctly.

type PipelineSchemaMajorVersion

type PipelineSchemaMajorVersion int

PipelineSchemaMajorVersion is the major version number of the pipeline manifest schema

const (
	// Ver1 is the current schema major version of the pipelines/*/manifest.yml file.
	Ver1 PipelineSchemaMajorVersion = iota + 1
)

type PipelineStage

type PipelineStage struct {
	Name             string             `yaml:"name"`
	RequiresApproval bool               `yaml:"requires_approval,omitempty"`
	TestCommands     []string           `yaml:"test_commands,omitempty"`
	Deployments      Deployments        `yaml:"deployments,omitempty"`
	PreDeployments   PrePostDeployments `yaml:"pre_deployments,omitempty"`
	PostDeployments  PrePostDeployments `yaml:"post_deployments,omitempty"`
}

PipelineStage represents a stage in the pipeline manifest

type PlacementArgOrString added in v1.19.0

type PlacementArgOrString struct {
	*PlacementString
	PlacementArgs
}

PlacementArgOrString represents where to place tasks.

func (*PlacementArgOrString) IsEmpty added in v1.19.0

func (p *PlacementArgOrString) IsEmpty() bool

IsEmpty returns empty if the struct has all zero members.

func (*PlacementArgOrString) UnmarshalYAML added in v1.19.0

func (p *PlacementArgOrString) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML overrides the default YAML unmarshaling logic for the PlacementArgOrString struct, allowing it to perform more complex unmarshaling behavior. This method implements the yaml.Unmarshaler (v3) interface.

type PlacementArgs added in v1.19.0

type PlacementArgs struct {
	Subnets SubnetListOrArgs `yaml:"subnets"`
}

PlacementArgs represents where to place tasks.

type PlacementString added in v1.19.0

type PlacementString string

PlacementString represents what types of subnets (public or private subnets) to place tasks.

type PlatformArgs added in v1.10.0

type PlatformArgs struct {
	OSFamily *string `yaml:"osfamily,omitempty"`
	Arch     *string `yaml:"architecture,omitempty"`
}

PlatformArgs represents the specifics of a target OS.

func (*PlatformArgs) String added in v1.12.0

func (p *PlatformArgs) String() string

String implements the fmt.Stringer interface.

type PlatformArgsOrString added in v1.10.0

type PlatformArgsOrString struct {
	*PlatformString
	PlatformArgs PlatformArgs
}

PlatformArgsOrString is a custom type which supports unmarshaling yaml which can either be of type string or type PlatformArgs.

func (*PlatformArgsOrString) Arch added in v1.12.0

func (p *PlatformArgsOrString) Arch() string

Arch returns the architecture of PlatformArgsOrString.

func (*PlatformArgsOrString) IsEmpty added in v1.12.0

func (p *PlatformArgsOrString) IsEmpty() bool

IsEmpty returns if the platform field is empty.

func (*PlatformArgsOrString) OS added in v1.12.0

func (p *PlatformArgsOrString) OS() string

OS returns the operating system family.

func (*PlatformArgsOrString) UnmarshalYAML added in v1.10.0

func (p *PlatformArgsOrString) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML overrides the default YAML unmarshaling logic for the PlatformArgsOrString struct, allowing it to perform more complex unmarshaling behavior. This method implements the yaml.Unmarshaler (v3) interface.

type PlatformString added in v1.11.0

type PlatformString string

PlatformString represents the string format of Platform.

type PrePostDeployment added in v1.30.0

type PrePostDeployment struct {
	BuildspecPath string   `yaml:"buildspec"`
	DependsOn     []string `yaml:"depends_on"`
}

PrePostDeployment is the config for a pre- or post-deployment action backed by CodeBuild.

type PrePostDeployments added in v1.30.0

type PrePostDeployments map[string]*PrePostDeployment

PrePostDeployments represent a directed graph of cloudformation deployments.

type Provider

type Provider interface {
	fmt.Stringer
	Name() string
	Properties() map[string]interface{}
}

Provider defines a source of the artifacts that will be built and deployed via a pipeline

func NewProvider

func NewProvider(configs interface{}) (Provider, error)

NewProvider creates a source provider based on the type of the provided provider-specific configurations

type PublicHTTPConfig added in v1.21.0

type PublicHTTPConfig struct {
	DeprecatedSG  DeprecatedALBSecurityGroupsConfig `yaml:"security_groups,omitempty"` // Deprecated. This configuration is now available inside Ingress field.
	Certificates  []string                          `yaml:"certificates,omitempty"`
	ELBAccessLogs ELBAccessLogsArgsOrBool           `yaml:"access_logs,omitempty"`
	Ingress       RestrictiveIngress                `yaml:"ingress,omitempty"`
	SSLPolicy     *string                           `yaml:"ssl_policy,omitempty"`
}

PublicHTTPConfig represents the configuration settings for an environment public ALB.

func (PublicHTTPConfig) IsEmpty added in v1.21.0

func (cfg PublicHTTPConfig) IsEmpty() bool

IsEmpty returns true if there is no customization to the public ALB.

type PublishConfig added in v1.8.3

type PublishConfig struct {
	Topics []Topic `yaml:"topics"`
}

PublishConfig represents the configurable options for setting up publishers.

type QueueScaling added in v1.11.0

type QueueScaling struct {
	AcceptableLatency *time.Duration `yaml:"acceptable_latency"`
	AvgProcessingTime *time.Duration `yaml:"msg_processing_time"`
	Cooldown          Cooldown       `yaml:"cooldown"`
}

QueueScaling represents the configuration to scale a service based on a SQS queue.

func (*QueueScaling) AcceptableBacklogPerTask added in v1.11.0

func (qs *QueueScaling) AcceptableBacklogPerTask() (int, error)

AcceptableBacklogPerTask returns the total number of messages that each task can accumulate in the queue while maintaining the AcceptableLatency given the AvgProcessingTime.

func (*QueueScaling) IsEmpty added in v1.11.0

func (qs *QueueScaling) IsEmpty() bool

IsEmpty returns true if the QueueScaling is set.

type Range added in v0.4.0

type Range struct {
	Value       *IntRangeBand // Mutually exclusive with RangeConfig
	RangeConfig RangeConfig
}

Range contains either a Range or a range configuration for Autoscaling ranges.

func (*Range) IsEmpty added in v1.11.0

func (r *Range) IsEmpty() bool

IsEmpty returns whether Range is empty.

func (*Range) Parse added in v0.4.0

func (r *Range) Parse() (min int, max int, err error)

Parse extracts the min and max from RangeOpts.

func (*Range) UnmarshalYAML added in v1.6.0

func (r *Range) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML overrides the default YAML unmarshaling logic for the RangeOpts struct, allowing it to perform more complex unmarshaling behavior. This method implements the yaml.Unmarshaler (v3) interface.

type RangeConfig added in v1.6.0

type RangeConfig struct {
	Min      *int `yaml:"min"`
	Max      *int `yaml:"max"`
	SpotFrom *int `yaml:"spot_from"`
}

RangeConfig containers a Min/Max and an optional SpotFrom field which specifies the number of services you want to start placing on spot. For example, if your range is 1-10 and `spot_from` is 5, up to 4 services will be placed on dedicated Fargate capacity, and then after that, any scaling event will place additioanl services on spot capacity.

func (*RangeConfig) IsEmpty added in v1.6.0

func (r *RangeConfig) IsEmpty() bool

IsEmpty returns whether RangeConfig is empty.

type RelaxedIngress added in v1.23.0

type RelaxedIngress struct {
	VPCIngress *bool `yaml:"vpc"`
}

RelaxedIngress contains ingress configuration to add to a security group.

func (RelaxedIngress) IsEmpty added in v1.23.0

func (i RelaxedIngress) IsEmpty() bool

IsEmpty returns true if there are no specified fields for relaxed ingress.

type RequestDrivenWebService added in v1.7.0

type RequestDrivenWebService struct {
	Workload                      `yaml:",inline"`
	RequestDrivenWebServiceConfig `yaml:",inline"`
	Environments                  map[string]*RequestDrivenWebServiceConfig `yaml:",flow"` // Fields to override per environment.
	// contains filtered or unexported fields
}

RequestDrivenWebService holds the configuration to create a Request-Driven Web Service.

func NewRequestDrivenWebService added in v1.7.0

func NewRequestDrivenWebService(props *RequestDrivenWebServiceProps) *RequestDrivenWebService

NewRequestDrivenWebService creates a new Request-Driven Web Service manifest with default values.

func (*RequestDrivenWebService) BuildArgs added in v1.7.0

func (s *RequestDrivenWebService) BuildArgs(contextDir string) (map[string]*DockerBuildArgs, error)

BuildArgs returns a docker.BuildArguments object given a context directory.

func (*RequestDrivenWebService) ContainerPlatform added in v1.12.0

func (s *RequestDrivenWebService) ContainerPlatform() string

ContainerPlatform returns the platform for the service.

func (*RequestDrivenWebService) Dockerfile added in v1.33.0

func (s *RequestDrivenWebService) Dockerfile() string

Dockerfile returns the relative path of the Dockerfile in the manifest.

func (*RequestDrivenWebService) MarshalBinary added in v1.7.0

func (s *RequestDrivenWebService) MarshalBinary() ([]byte, error)

MarshalBinary serializes the manifest object into a binary YAML document. Implements the encoding.BinaryMarshaler interface.

func (*RequestDrivenWebService) Port added in v1.10.0

func (s *RequestDrivenWebService) Port() (port uint16, ok bool)

Port returns the exposed the exposed port in the manifest. A RequestDrivenWebService always has a port exposed therefore the boolean is always true.

func (*RequestDrivenWebService) Publish added in v1.10.0

func (s *RequestDrivenWebService) Publish() []Topic

Publish returns the list of topics where notifications can be published.

type RequestDrivenWebServiceConfig added in v1.7.0

type RequestDrivenWebServiceConfig struct {
	RequestDrivenWebServiceHttpConfig `yaml:"http,flow"`
	InstanceConfig                    AppRunnerInstanceConfig              `yaml:",inline"`
	ImageConfig                       ImageWithPort                        `yaml:"image"`
	Variables                         map[string]Variable                  `yaml:"variables"`
	Secrets                           map[string]Secret                    `yaml:"secrets"`
	StartCommand                      *string                              `yaml:"command"`
	Tags                              map[string]string                    `yaml:"tags"`
	PublishConfig                     PublishConfig                        `yaml:"publish"`
	Network                           RequestDrivenWebServiceNetworkConfig `yaml:"network"`
	Observability                     Observability                        `yaml:"observability"`
	Count                             *string                              `yaml:"count"`
}

RequestDrivenWebServiceConfig holds the configuration that can be overridden per environments.

type RequestDrivenWebServiceHttpConfig added in v1.7.0

type RequestDrivenWebServiceHttpConfig struct {
	HealthCheckConfiguration HealthCheckArgsOrString   `yaml:"healthcheck"`
	Alias                    *string                   `yaml:"alias"`
	Private                  Union[*bool, VPCEndpoint] `yaml:"private"`
}

RequestDrivenWebServiceHttpConfig represents options for configuring http.

type RequestDrivenWebServiceNetworkConfig added in v1.13.0

type RequestDrivenWebServiceNetworkConfig struct {
	VPC rdwsVpcConfig `yaml:"vpc"`
}

RequestDrivenWebServiceNetworkConfig represents options for network connection to AWS resources for a Request-Driven Web Service.

func (*RequestDrivenWebServiceNetworkConfig) IsEmpty added in v1.13.0

IsEmpty returns empty if the struct has all zero members.

type RequestDrivenWebServiceProps added in v1.7.0

type RequestDrivenWebServiceProps struct {
	*WorkloadProps
	Port     uint16
	Platform PlatformArgsOrString
	Private  bool
}

RequestDrivenWebServiceProps contains properties for creating a new request-driven web service manifest.

type RestrictiveIngress added in v1.21.0

type RestrictiveIngress struct {
	CDNIngress *bool   `yaml:"cdn"`
	SourceIPs  []IPNet `yaml:"source_ips"`
}

RestrictiveIngress represents ingress fields which restrict default behavior of allowing all public ingress.

func (RestrictiveIngress) IsEmpty added in v1.21.0

func (i RestrictiveIngress) IsEmpty() bool

IsEmpty returns true if there are no specified fields for restrictive ingress.

type RoutingRule

type RoutingRule struct {
	Path                *string                 `yaml:"path"`
	ProtocolVersion     *string                 `yaml:"version"`
	HealthCheck         HealthCheckArgsOrString `yaml:"healthcheck"`
	Stickiness          *bool                   `yaml:"stickiness"`
	Alias               Alias                   `yaml:"alias"`
	DeregistrationDelay *time.Duration          `yaml:"deregistration_delay"`
	// TargetContainer is the container load balancer routes traffic to.
	TargetContainer  *string `yaml:"target_container"`
	TargetPort       *uint16 `yaml:"target_port"`
	AllowedSourceIps []IPNet `yaml:"allowed_source_ips"`
	HostedZone       *string `yaml:"hosted_zone"`
	// RedirectToHTTPS configures a HTTP->HTTPS redirect. If nil, default to true.
	RedirectToHTTPS *bool `yaml:"redirect_to_https"`
}

RoutingRule holds listener rule configuration for ALB.

func (*RoutingRule) HealthCheckPort added in v1.31.0

func (r *RoutingRule) HealthCheckPort(mainContainerPort *uint16) uint16

HealthCheckPort returns the port a HealthCheck is set to for a RoutingRule.

func (*RoutingRule) IsEmpty added in v1.27.0

func (r *RoutingRule) IsEmpty() bool

IsEmpty returns true if RoutingRule has empty configuration.

func (*RoutingRule) Target added in v1.27.0

func (rule *RoutingRule) Target(exposedPorts ExposedPortsIndex) (targetContainer string, targetPort string, err error)

Target returns target container and target port for the ALB configuration. This method should be called only when ALB config is not empty.

type SQSQueue added in v1.9.0

type SQSQueue struct {
	Retention  *time.Duration          `yaml:"retention"`
	Delay      *time.Duration          `yaml:"delay"`
	Timeout    *time.Duration          `yaml:"timeout"`
	DeadLetter DeadLetterQueue         `yaml:"dead_letter"`
	FIFO       FIFOAdvanceConfigOrBool `yaml:"fifo"`
}

SQSQueue represents the configurable options for setting up a SQS Queue.

func (*SQSQueue) IsEmpty added in v1.11.0

func (q *SQSQueue) IsEmpty() bool

IsEmpty returns empty if the struct has all zero members.

type SQSQueueOrBool added in v1.11.0

type SQSQueueOrBool struct {
	Advanced SQSQueue
	Enabled  *bool
}

SQSQueueOrBool is a custom type which supports unmarshaling yaml which can either be of type bool or type SQSQueue.

func (*SQSQueueOrBool) IsEmpty added in v1.11.0

func (q *SQSQueueOrBool) IsEmpty() bool

IsEmpty returns empty if the struct has all zero members.

func (*SQSQueueOrBool) UnmarshalYAML added in v1.11.0

func (q *SQSQueueOrBool) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML implements the yaml(v3) interface. It allows SQSQueueOrBool to be specified as a string or a struct alternately.

type ScalingConfigOrT added in v1.20.0

type ScalingConfigOrT[T ~int | time.Duration] struct {
	Value         *T
	ScalingConfig AdvancedScalingConfig[T] // mutually exclusive with Value
}

ScalingConfigOrT represents a resource that has autoscaling configurations or a generic value.

func (*ScalingConfigOrT[_]) IsEmpty added in v1.20.0

func (r *ScalingConfigOrT[_]) IsEmpty() bool

IsEmpty returns whether ScalingConfigOrT is empty

func (*ScalingConfigOrT[_]) UnmarshalYAML added in v1.20.0

func (r *ScalingConfigOrT[_]) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML overrides the default YAML unmarshaling logic for the ScalingConfigOrT struct, allowing it to perform more complex unmarshaling behavior. This method implements the yaml.Unmarshaler (v3) interface.

type ScheduledJob added in v0.4.0

type ScheduledJob struct {
	Workload           `yaml:",inline"`
	ScheduledJobConfig `yaml:",inline"`
	Environments       map[string]*ScheduledJobConfig `yaml:",flow"`
	// contains filtered or unexported fields
}

ScheduledJob holds the configuration to build a container image that is run periodically in a given environment with timeout and retry logic.

func NewScheduledJob added in v0.4.0

func NewScheduledJob(props *ScheduledJobProps) *ScheduledJob

NewScheduledJob creates a new scheduled job object.

func (*ScheduledJob) BuildArgs added in v0.5.0

func (j *ScheduledJob) BuildArgs(contextDir string) (map[string]*DockerBuildArgs, error)

BuildArgs returns a docker.BuildArguments object for the job given a context directory.

func (*ScheduledJob) ContainerDependencies added in v1.32.1

func (s *ScheduledJob) ContainerDependencies() map[string]ContainerDependency

ContainerDependencies returns a map of ContainerDependency objects for ScheduledJob including dependencies for its main container, any logging sidecar, and additional sidecars.

func (*ScheduledJob) Dockerfile added in v1.33.0

func (j *ScheduledJob) Dockerfile() string

Dockerfile returns the relative path of the Dockerfile in the manifest.

func (*ScheduledJob) EnvFiles added in v1.27.0

func (j *ScheduledJob) EnvFiles() map[string]string

EnvFiles returns the locations of all env files against the ws root directory. This method returns a map[string]string where the keys are container names and the values are either env file paths or empty strings.

func (*ScheduledJob) ExposedPorts added in v1.25.0

func (j *ScheduledJob) ExposedPorts() (ExposedPortsIndex, error)

ExposedPorts returns all the ports that are sidecar container ports available to receive traffic.

func (*ScheduledJob) MarshalBinary added in v0.4.0

func (j *ScheduledJob) MarshalBinary() ([]byte, error)

MarshalBinary serializes the manifest object into a binary YAML document. Implements the encoding.BinaryMarshaler interface.

func (*ScheduledJob) Publish added in v1.10.0

func (j *ScheduledJob) Publish() []Topic

Publish returns the list of topics where notifications can be published.

type ScheduledJobConfig added in v0.4.0

type ScheduledJobConfig struct {
	ImageConfig             ImageWithHealthcheck `yaml:"image,flow"`
	ImageOverride           `yaml:",inline"`
	TaskConfig              `yaml:",inline"`
	Logging                 Logging                   `yaml:"logging,flow"`
	Sidecars                map[string]*SidecarConfig `yaml:"sidecars"` // NOTE: keep the pointers because `mergo` doesn't automatically deep merge map's value unless it's a pointer type.
	On                      JobTriggerConfig          `yaml:"on,flow"`
	JobFailureHandlerConfig `yaml:",inline"`
	Network                 NetworkConfig  `yaml:"network"`
	PublishConfig           PublishConfig  `yaml:"publish"`
	TaskDefOverrides        []OverrideRule `yaml:"taskdef_overrides"`
}

ScheduledJobConfig holds the configuration for a scheduled job

type ScheduledJobProps added in v0.4.0

type ScheduledJobProps struct {
	*WorkloadProps
	Schedule    string
	Timeout     string
	HealthCheck ContainerHealthCheck // Optional healthcheck configuration.
	Platform    PlatformArgsOrString // Optional platform configuration.
	Retries     int
}

ScheduledJobProps contains properties for creating a new scheduled job manifest.

type Secret added in v1.15.0

type Secret struct {
	// contains filtered or unexported fields
}

Secret represents an identifier for sensitive data stored in either SSM or SecretsManager.

func (*Secret) IsSecretsManagerName added in v1.15.0

func (s *Secret) IsSecretsManagerName() bool

IsSecretsManagerName returns true if the secret refers to the name of a secret stored in SecretsManager.

func (*Secret) RequiresImport added in v1.25.0

func (s *Secret) RequiresImport() bool

RequiresImport returns true if the SSM parameter name or secret ARN value is imported from CloudFormation stack.

func (*Secret) UnmarshalYAML added in v1.15.0

func (s *Secret) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML implements the yaml.Unmarshaler (v3) interface to override the default YAML unmarshaling logic.

func (*Secret) Value added in v1.15.0

func (s *Secret) Value() string

Value returns the secret value provided by clients.

type SecurityGroupsConfig added in v1.20.0

type SecurityGroupsConfig struct {
	SecurityGroups []StringOrFromCFN `yaml:"groups"`
	DenyDefault    *bool             `yaml:"deny_default"`
}

SecurityGroupsConfig represents which security groups are attached to a task and if default security group is applied.

type SecurityGroupsIDsOrConfig added in v1.20.0

type SecurityGroupsIDsOrConfig struct {
	IDs            []StringOrFromCFN
	AdvancedConfig SecurityGroupsConfig
}

SecurityGroupsIDsOrConfig represents security groups attached to task. It supports unmarshalling yaml which can either be of type SecurityGroupsConfig or a list of strings.

func (*SecurityGroupsIDsOrConfig) GetIDs added in v1.20.0

GetIDs returns security groups from SecurityGroupsIDsOrConfig that are attached to task. nil is returned if no security groups are specified.

func (*SecurityGroupsIDsOrConfig) IsDefaultSecurityGroupDenied added in v1.20.0

func (s *SecurityGroupsIDsOrConfig) IsDefaultSecurityGroupDenied() bool

IsDefaultSecurityGroupDenied returns true if DenyDefault is set to true in SecurityGroupsIDsOrConfig.AdvancedConfig. Otherwise, false is returned.

func (*SecurityGroupsIDsOrConfig) UnmarshalYAML added in v1.20.0

func (s *SecurityGroupsIDsOrConfig) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML overrides the default YAML unmarshalling logic for the SecurityGroupsIDsOrConfig struct, allowing it to be unmarshalled into a string slice or a string. This method implements the yaml.Unmarshaler (v3) interface.

type ServiceConnectArgs added in v1.23.0

type ServiceConnectArgs struct {
	Alias *string
}

ServiceConnectArgs includes the advanced configuration for ECS Service Connect.

type ServiceConnectBoolOrArgs added in v1.23.0

type ServiceConnectBoolOrArgs struct {
	EnableServiceConnect *bool
	ServiceConnectArgs
}

ServiceConnectBoolOrArgs represents ECS Service Connect configuration.

func (*ServiceConnectBoolOrArgs) Enabled added in v1.24.0

func (s *ServiceConnectBoolOrArgs) Enabled() bool

Enabled returns if ServiceConnect is enabled or not.

func (*ServiceConnectBoolOrArgs) UnmarshalYAML added in v1.23.0

func (s *ServiceConnectBoolOrArgs) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML overrides the default YAML unmarshaling logic for the ServiceConnect struct, allowing it to perform more complex unmarshaling behavior. This method implements the yaml.Unmarshaler (v3) interface.

type ServiceConnectTargetContainer added in v1.31.0

type ServiceConnectTargetContainer struct {
	Container string
	Port      string
}

ServiceConnectTargetContainer contains the name of a container and port to expose to ECS Service Connect.

type SidecarConfig

type SidecarConfig struct {
	Port          *string                              `yaml:"port"`
	Image         Union[*string, ImageLocationOrBuild] `yaml:"image"`
	Essential     *bool                                `yaml:"essential"`
	CredsParam    *string                              `yaml:"credentialsParameter"`
	Variables     map[string]Variable                  `yaml:"variables"`
	EnvFile       *string                              `yaml:"env_file"`
	Secrets       map[string]Secret                    `yaml:"secrets"`
	MountPoints   []SidecarMountPoint                  `yaml:"mount_points"`
	DockerLabels  map[string]string                    `yaml:"labels"`
	DependsOn     DependsOn                            `yaml:"depends_on"`
	HealthCheck   ContainerHealthCheck                 `yaml:"healthcheck"`
	ImageOverride `yaml:",inline"`
}

SidecarConfig represents the configurable options for setting up a sidecar container.

func (*SidecarConfig) ImageURI added in v1.26.0

func (cfg *SidecarConfig) ImageURI() (string, bool)

ImageURI returns the location of the image if one is set. If the image needs to be build, return "" and false.

type SidecarMountPoint added in v1.2.0

type SidecarMountPoint struct {
	SourceVolume   *string `yaml:"source_volume"`
	MountPointOpts `yaml:",inline"`
}

SidecarMountPoint is used to let sidecars mount volumes defined in `storage`

type Source

type Source struct {
	ProviderName string                 `yaml:"provider"`
	Properties   map[string]interface{} `yaml:"properties"`
}

Source defines the source of the artifacts to be built and deployed.

func (Source) IsCodeStarConnection added in v1.5.0

func (s Source) IsCodeStarConnection() bool

IsCodeStarConnection indicates to the manifest if this source requires a CSC connection.

type StaticSite added in v1.26.0

type StaticSite struct {
	Workload         `yaml:",inline"`
	StaticSiteConfig `yaml:",inline"`
	// Use *StaticSiteConfig because of https://github.com/imdario/mergo/issues/146
	Environments map[string]*StaticSiteConfig `yaml:",flow"` // Fields to override per environment.
	// contains filtered or unexported fields
}

StaticSite holds the configuration to configure and upload static assets to the static site service.

func NewStaticSite added in v1.26.0

func NewStaticSite(props StaticSiteProps) *StaticSite

NewStaticSite creates a new static site service with props.

func (*StaticSite) MarshalBinary added in v1.26.0

func (s *StaticSite) MarshalBinary() ([]byte, error)

MarshalBinary serializes the manifest object into a binary YAML document. Implements the encoding.BinaryMarshaler interface.

type StaticSiteConfig added in v1.26.0

type StaticSiteConfig struct {
	HTTP        StaticSiteHTTP `yaml:"http"`
	FileUploads []FileUpload   `yaml:"files"`
}

StaticSiteConfig holds the configuration for a static site service.

type StaticSiteHTTP added in v1.28.0

type StaticSiteHTTP struct {
	Alias       string `yaml:"alias"`
	Certificate string `yaml:"certificate"`
}

StaticSiteHTTP defines the http configuration for the static site.

type StaticSiteProps added in v1.28.0

type StaticSiteProps struct {
	Name string
	StaticSiteConfig
}

StaticSiteProps represents the configuration needed to create a static site service.

type Storage added in v1.2.0

type Storage struct {
	Ephemeral      *int               `yaml:"ephemeral"`
	ReadonlyRootFS *bool              `yaml:"readonly_fs"`
	Volumes        map[string]*Volume `yaml:"volumes"` // NOTE: keep the pointers because `mergo` doesn't automatically deep merge map's value unless it's a pointer type.
}

Storage represents the options for external and native storage.

func (*Storage) IsEmpty added in v1.11.0

func (s *Storage) IsEmpty() bool

IsEmpty returns empty if the struct has all zero members.

type StringOrFromCFN added in v1.30.0

type StringOrFromCFN struct {
	Plain   *string // Plain is a user-defined string value.
	FromCFN fromCFN // FromCFN holds a value obtained from CloudFormation.
}

StringOrFromCFN represents a choice between a plain string value and a value retrieved from CloudFormation.

func (*StringOrFromCFN) UnmarshalYAML added in v1.30.0

func (s *StringOrFromCFN) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML implements the yaml.Unmarshaler (v3) interface to override the default YAML unmarshalling logic.

type StringSliceOrString added in v1.21.0

type StringSliceOrString struct {
	String      *string
	StringSlice []string
}

StringSliceOrString is a custom type that can either be of type string or type slice of string.

func (*StringSliceOrString) ToStringSlice added in v1.27.0

func (s *StringSliceOrString) ToStringSlice() []string

ToStringSlice converts an StringSliceOrString to a slice of string.

func (*StringSliceOrString) UnmarshalYAML added in v1.21.0

func (s *StringSliceOrString) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML overrides the default YAML unmarshaling logic for the StringSliceOrString struct, allowing it to perform more complex unmarshaling behavior. This method implements the yaml.Unmarshaler (v3) interface.

type SubnetArgs added in v1.21.0

type SubnetArgs struct {
	FromTags Tags `yaml:"from_tags"`
}

SubnetArgs represents what subnets to place tasks.

type SubnetListOrArgs added in v1.21.0

type SubnetListOrArgs struct {
	IDs []string
	SubnetArgs
}

SubnetListOrArgs represents what subnets to place tasks. It supports unmarshalling yaml which can either be of type SubnetArgs or a list of strings.

func (*SubnetListOrArgs) UnmarshalYAML added in v1.21.0

func (s *SubnetListOrArgs) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML overrides the default YAML unmarshaling logic for the SubnetListOrArgs struct, allowing it to perform more complex unmarshaling behavior. This method implements the yaml.Unmarshaler (v3) interface.

type SubscribeConfig added in v1.9.0

type SubscribeConfig struct {
	Topics []TopicSubscription `yaml:"topics"`
	Queue  SQSQueue            `yaml:"queue"`
}

SubscribeConfig represents the configurable options for setting up subscriptions.

func (*SubscribeConfig) IsEmpty added in v1.11.0

func (s *SubscribeConfig) IsEmpty() bool

IsEmpty returns empty if the struct has all zero members.

type Tags added in v1.21.0

type Tags map[string]StringSliceOrString

Tags represents the aws tags which take string as key and slice of string as values.

type TaskConfig

type TaskConfig struct {
	CPU            *int                 `yaml:"cpu"`
	Memory         *int                 `yaml:"memory"`
	Platform       PlatformArgsOrString `yaml:"platform,omitempty"`
	Count          Count                `yaml:"count"`
	ExecuteCommand ExecuteCommand       `yaml:"exec"`
	Variables      map[string]Variable  `yaml:"variables"`
	EnvFile        *string              `yaml:"env_file"`
	Secrets        map[string]Secret    `yaml:"secrets"`
	Storage        Storage              `yaml:"storage"`
}

TaskConfig represents the resource boundaries and environment variables for the containers in the task.

func (*TaskConfig) ContainerPlatform added in v1.12.0

func (t *TaskConfig) ContainerPlatform() string

ContainerPlatform returns the platform for the service.

func (TaskConfig) IsARM added in v1.13.0

func (t TaskConfig) IsARM() bool

IsARM returns whether or not the service is building with an ARM Arch.

func (TaskConfig) IsWindows added in v1.12.0

func (t TaskConfig) IsWindows() bool

IsWindows returns whether or not the service is building with a Windows OS.

type Topic added in v1.8.3

type Topic struct {
	Name *string                      `yaml:"name"`
	FIFO FIFOTopicAdvanceConfigOrBool `yaml:"fifo"`
}

Topic represents the configurable options for setting up a SNS Topic.

type TopicSubscription added in v1.9.0

type TopicSubscription struct {
	Name         *string                `yaml:"name"`
	Service      *string                `yaml:"service"`
	FilterPolicy map[string]interface{} `yaml:"filter_policy"`
	Queue        SQSQueueOrBool         `yaml:"queue"`
}

TopicSubscription represents the configurable options for setting up a SNS Topic Subscription.

type Union added in v1.23.0

type Union[Basic, Advanced any] struct {

	// Basic holds the value of Union if IsBasic() is true.
	// If IsBasic() is false, this is the zero value of type Basic.
	//
	// Basic is exported to support mergo. It should not be set
	// directly. Use NewUnionBasic() to create a Union with Basic set.
	Basic Basic

	// Advanced holds the value of Union if IsAdvanced() is true.
	// If IsAdvanced() is false, this is the zero value of type Advanced.
	//
	// Advanced is exported to support mergo. It should not be set
	// directly. Use NewUnionAdvanced() to create a Union with Advanced set.
	Advanced Advanced
	// contains filtered or unexported fields
}

Union is a type used for yaml keys that may be of type Basic or Advanced. Union will only ever hold one of the underlying types, never both.

Union is exported to enable type embedding.

func AdvancedToUnion added in v1.23.0

func AdvancedToUnion[Basic, Advanced any](val Advanced) Union[Basic, Advanced]

AdvancedToUnion creates a new Union[Basic, Advanced] with the underlying type set to Advanced, holding val.

func BasicToUnion added in v1.23.0

func BasicToUnion[Basic, Advanced any](val Basic) Union[Basic, Advanced]

BasicToUnion creates a new Union[Basic, Advanced] with the underlying type set to Basic, holding val.

func (Union[_, _]) IsAdvanced added in v1.23.0

func (t Union[_, _]) IsAdvanced() bool

IsAdvanced returns true if the underlying value of t is type Advanced.

func (Union[_, _]) IsBasic added in v1.23.0

func (t Union[_, _]) IsBasic() bool

IsBasic returns true if the underlying value of t is type Basic.

func (Union[_, _]) IsZero added in v1.23.0

func (t Union[_, _]) IsZero() bool

IsZero returns true if the set value of t is determined to be zero via yaml.Zeroer or reflection. It also returns true if neither value for t is set.

func (Union[_, _]) MarshalYAML added in v1.23.0

func (t Union[_, _]) MarshalYAML() (interface{}, error)

MarshalYAML implements yaml.Marshaler.

func (*Union[Basic, Advanced]) SetAdvanced added in v1.24.0

func (t *Union[Basic, Advanced]) SetAdvanced(v Advanced)

SetAdvanced changes the value of the Union to v.

func (*Union[Basic, Advanced]) SetBasic added in v1.24.0

func (t *Union[Basic, Advanced]) SetBasic(v Basic)

SetBasic changes the value of the Union to v.

func (*Union[Basic, Advanced]) UnmarshalYAML added in v1.23.0

func (t *Union[Basic, Advanced]) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML decodes value into either type Basic or Advanced, and stores that value in t. Value is first decoded into type Basic, and t will hold type Basic if (1) There was no error decoding value into type Basic and (2) Basic.IsZero() returns false OR Basic is not zero via reflection.

If Basic didn't meet the above criteria, then value is decoded into type Advanced. t will hold type Advanced if Advanced meets the same conditions that were required for type Basic.

An error is returned if value fails to decode into either type or both types are zero after decoding.

type VPCEndpoint added in v1.23.0

type VPCEndpoint struct {
	Endpoint *string `yaml:"endpoint"`
}

VPCEndpoint is used to configure a pre-existing VPC endpoint.

type VPCFlowLogsArgs added in v1.24.0

type VPCFlowLogsArgs struct {
	Retention *int `yaml:"retention,omitempty"`
}

VPCFlowLogsArgs holds the flow logs configuration.

func (*VPCFlowLogsArgs) IsZero added in v1.24.0

func (fl *VPCFlowLogsArgs) IsZero() bool

IsZero implements yaml.IsZeroer.

type Variable added in v1.25.0

type Variable struct {
	StringOrFromCFN
}

Variable represents an identifier for the value of an environment variable.

func (*Variable) RequiresImport added in v1.25.0

func (v *Variable) RequiresImport() bool

RequiresImport returns true if the value is imported from an environment.

func (*Variable) UnmarshalYAML added in v1.25.0

func (v *Variable) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML implements the yaml.Unmarshaler (v3) interface to override the default YAML unmarshalling logic.

func (*Variable) Value added in v1.25.0

func (v *Variable) Value() string

Value returns the value, whether it is used for import or not.

type Volume added in v1.2.0

type Volume struct {
	EFS            EFSConfigOrBool `yaml:"efs"`
	MountPointOpts `yaml:",inline"`
}

Volume is an abstraction which merges the MountPoint and Volumes concepts from the ECS Task Definition

func (*Volume) EmptyVolume added in v1.6.0

func (v *Volume) EmptyVolume() bool

EmptyVolume returns true if the EFS configuration is nil or explicitly/implicitly disabled.

type WorkerAlarmArgs added in v1.26.0

type WorkerAlarmArgs struct {
	AlarmArgs       `yaml:",inline"`
	MessagesDelayed *int `yaml:"messages_delayed"`
}

WorkerAlarmArgs represents specs of CloudWatch alarms for Worker Service deployment rollbacks.

type WorkerDeploymentConfig added in v1.26.0

type WorkerDeploymentConfig struct {
	DeploymentControllerConfig `yaml:",inline"`
	WorkerRollbackAlarms       Union[[]string, WorkerAlarmArgs] `yaml:"rollback_alarms"`
}

WorkerDeploymentConfig represents the deployment strategies for a worker service.

type WorkerService added in v1.9.0

type WorkerService struct {
	Workload            `yaml:",inline"`
	WorkerServiceConfig `yaml:",inline"`
	// Use *WorkerServiceConfig because of https://github.com/imdario/mergo/issues/146
	Environments map[string]*WorkerServiceConfig `yaml:",flow"`
	// contains filtered or unexported fields
}

WorkerService holds the configuration to create a worker service.

func NewWorkerService added in v1.9.0

func NewWorkerService(props WorkerServiceProps) *WorkerService

NewWorkerService applies the props to a default Worker service configuration with minimal cpu/memory thresholds, single replica, no healthcheck, and then returns it.

func (*WorkerService) BuildArgs added in v1.9.0

func (s *WorkerService) BuildArgs(contextDir string) (map[string]*DockerBuildArgs, error)

BuildArgs returns a docker.BuildArguments object for the service given a context directory

func (*WorkerService) ContainerDependencies added in v1.32.1

func (s *WorkerService) ContainerDependencies() map[string]ContainerDependency

ContainerDependencies returns a map of ContainerDependency objects for the WorkerService including dependencies for its main container, any logging sidecar, and additional sidecars.

func (*WorkerService) Dockerfile added in v1.33.0

func (s *WorkerService) Dockerfile() string

Dockerfile returns the relative path of the Dockerfile in the manifest.

func (*WorkerService) EnvFiles added in v1.27.0

func (s *WorkerService) EnvFiles() map[string]string

EnvFiles returns the locations of all env files against the ws root directory. This method returns a map[string]string where the keys are container names and the values are either env file paths or empty strings.

func (*WorkerService) ExposedPorts added in v1.25.0

func (ws *WorkerService) ExposedPorts() (ExposedPortsIndex, error)

ExposedPorts returns all the ports that are sidecar container ports available to receive traffic.

func (*WorkerService) MarshalBinary added in v1.9.0

func (s *WorkerService) MarshalBinary() ([]byte, error)

MarshalBinary serializes the manifest object into a binary YAML document. Implements the encoding.BinaryMarshaler interface.

func (*WorkerService) Publish added in v1.12.0

func (s *WorkerService) Publish() []Topic

Publish returns the list of topics where notifications can be published.

func (*WorkerService) Subscriptions added in v1.10.0

func (s *WorkerService) Subscriptions() []TopicSubscription

Subscriptions returns a list of TopicSubscriotion objects which represent the SNS topics the service receives messages from. This method also appends ".fifo" to the topics and returns a new set of subs.

type WorkerServiceConfig added in v1.9.0

type WorkerServiceConfig struct {
	ImageConfig      ImageWithHealthcheck `yaml:"image,flow"`
	ImageOverride    `yaml:",inline"`
	TaskConfig       `yaml:",inline"`
	Logging          Logging                   `yaml:"logging,flow"`
	Sidecars         map[string]*SidecarConfig `yaml:"sidecars"` // NOTE: keep the pointers because `mergo` doesn't automatically deep merge map's value unless it's a pointer type.
	Subscribe        SubscribeConfig           `yaml:"subscribe"`
	PublishConfig    PublishConfig             `yaml:"publish"`
	Network          NetworkConfig             `yaml:"network"`
	TaskDefOverrides []OverrideRule            `yaml:"taskdef_overrides"`
	DeployConfig     WorkerDeploymentConfig    `yaml:"deployment"`
	Observability    Observability             `yaml:"observability"`
}

WorkerServiceConfig holds the configuration that can be overridden per environments.

type WorkerServiceProps added in v1.9.0

type WorkerServiceProps struct {
	WorkloadProps

	HealthCheck ContainerHealthCheck // Optional healthcheck configuration.
	Platform    PlatformArgsOrString // Optional platform configuration.
	Topics      []TopicSubscription  // Optional topics for subscriptions
	Queue       SQSQueue             // Optional queue configuration.
}

WorkerServiceProps represents the configuration needed to create a worker service.

type Workload added in v0.4.0

type Workload struct {
	Name *string `yaml:"name"`
	Type *string `yaml:"type"` // must be one of the supported manifest types.
}

Workload holds the basic data that every workload manifest file needs to have.

type WorkloadProps added in v0.4.0

type WorkloadProps struct {
	Name                    string
	Dockerfile              string
	Image                   string
	PrivateOnlyEnvironments []string
}

WorkloadProps contains properties for creating a new workload manifest.

Directories

Path Synopsis
Package manifestinfo provides access to information embedded in a manifest.
Package manifestinfo provides access to information embedded in a manifest.
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL