config

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const ArchitectureDefault = ArchitectureAMD64
View Source
const (
	ConsoleTaskContainerName = "console"
)
View Source
const LoggingDisableFlag = "none"

Provide this value to the Driver or Type fields to disable

Variables

View Source
var DefaultCronEnvVars = map[string]string{
	"ECSDEPLOYER_CRON_SCHEDULE_ARN":   "<aws.scheduler.schedule-arn>",
	"ECSDEPLOYER_CRON_SCHEDULED_TIME": "<aws.scheduler.scheduled-time>",
	"ECSDEPLOYER_CRON_EXECUTION_ID":   "<aws.scheduler.execution-id>",
	"ECSDEPLOYER_CRON_ATTEMPT":        "<aws.scheduler.attempt-number>",
}
View Source
var DefaultDeploymentEnvVars = map[string]string{
	"ECSDEPLOYER_PROJECT":     "{{ .Project }}",
	"ECSDEPLOYER_TASK_NAME":   "{{ .Name }}",
	"ECSDEPLOYER_STAGE":       "{{ .Stage }}",
	"ECSDEPLOYER_DEPLOYED_AT": "{{ .Date }}",
	"ECSDEPLOYER_APP_VERSION": "{{ .Version }}",
	"ECSDEPLOYER_IMAGE_TAG":   "{{ .ImageTag }}",
}
View Source
var DefaultDeploymentLabels = map[string]string{
	"com.ecsdeployer.project": "{{ .Project }}",
	"com.ecsdeployer.task":    "{{ .Name }}",
	"com.ecsdeployer.stage":   "{{ .Stage }}",
}
View Source
var ErrInvalidArchitecture = NewValidationError("Invalid CPU Architecture")
View Source
var (
	ErrInvalidLogRetention = errors.New("invalid log retention")
)
View Source
var ErrKISMissingAllAttributesError = NewValidationError("If you override keep_in_sync, then you must define ALL attributes")
View Source
var (
	ErrNetworkFilterFormatError = errors.New("NetworkFilters must have both a value and a name")
)
View Source
var ErrValidation = errors.New("config validation error")

Functions

func ExportEnvVarMap added in v0.2.0

func ExportEnvVarMap[Te any, Ts any](varMap EnvVarMap, tpl templater, envVarFunc EnvVarExportFunc[Te], secretFunc EnvVarExportFunc[Ts]) ([]Te, []Ts, error)

Types

type Architecture

type Architecture uint8
const (
	ArchitectureAMD64 Architecture = iota
	ArchitectureARM64

	ArchitectureInvalid Architecture = 255
)

func ParseArchitecture added in v0.2.0

func ParseArchitecture(value string) (Architecture, error)

func (Architecture) JSONSchema added in v0.2.0

func (Architecture) JSONSchema() *jsonschema.Schema

func (*Architecture) MarshalText added in v0.3.0

func (obj *Architecture) MarshalText() ([]byte, error)

func (Architecture) String added in v0.2.0

func (arch Architecture) String() string

func (Architecture) ToAws added in v0.2.0

func (arch Architecture) ToAws() ecsTypes.CPUArchitecture

func (*Architecture) UnmarshalYAML added in v0.2.0

func (obj *Architecture) UnmarshalYAML(unmarshal func(interface{}) error) error

type AwsLogConfig

type AwsLogConfig struct {
	Disabled  bool          `yaml:"disabled,omitempty" json:"disabled,omitempty"`
	Retention *LogRetention `yaml:"retention,omitempty" json:"retention,omitempty"`
	Options   EnvVarMap     `yaml:"options,omitempty" json:"options,omitempty"`
}

Project level

func (*AwsLogConfig) ApplyDefaults

func (obj *AwsLogConfig) ApplyDefaults()

func (*AwsLogConfig) IsDisabled

func (obj *AwsLogConfig) IsDisabled() bool

func (AwsLogConfig) JSONSchemaExtend

func (AwsLogConfig) JSONSchemaExtend(base *jsonschema.Schema)

func (*AwsLogConfig) UnmarshalYAML

func (obj *AwsLogConfig) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*AwsLogConfig) Validate

func (obj *AwsLogConfig) Validate() error

type ClusterArn

type ClusterArn struct {
	NameArn
}

func (*ClusterArn) Arn

func (obj *ClusterArn) Arn(ctx *Context) (string, error)

type CommonContainerAttrs

type CommonContainerAttrs struct {
	Name          string             `yaml:"name,omitempty" json:"name,omitempty" jsonschema:"pattern=^[a-zA-Z][-_a-zA-Z0-9]*$"`
	Command       *ShellCommand      `yaml:"command,omitempty" json:"command,omitempty"`
	EntryPoint    *ShellCommand      `yaml:"entrypoint,omitempty" json:"entrypoint,omitempty"`
	Image         *ImageUri          `yaml:"image,omitempty" json:"image,omitempty"`
	Credentials   *string            `yaml:"credentials,omitempty" json:"credentials,omitempty"`
	Cpu           *CpuSpec           `yaml:"cpu,omitempty" json:"cpu,omitempty"`
	Memory        *MemorySpec        `yaml:"memory,omitempty" json:"memory,omitempty"`
	EnvVars       EnvVarMap          `yaml:"environment,omitempty" json:"environment,omitempty"`
	StartTimeout  *Duration          `yaml:"start_timeout,omitempty" json:"start_timeout,omitempty"`
	StopTimeout   *Duration          `yaml:"stop_timeout,omitempty" json:"stop_timeout,omitempty"`
	DockerLabels  []NameValuePair    `yaml:"labels,omitempty" json:"labels,omitempty"`
	DependsOn     []DependsOn        `yaml:"depends_on,omitempty" json:"depends_on,omitempty"`
	LoggingConfig *TaskLoggingConfig `yaml:"logging,omitempty" json:"logging,omitempty"`
	HealthCheck   *HealthCheck       `yaml:"healthcheck,omitempty" json:"healthcheck,omitempty"`
	MountPoints   []Mount            `yaml:"mounts,omitempty" json:"mounts,omitempty"`
	Ulimits       []Ulimit           `yaml:"ulimits,omitempty" json:"ulimits,omitempty"`
	User          *string            `yaml:"user,omitempty" json:"user,omitempty" jsonschema:"oneof_type=string;integer"`
	Workdir       *string            `yaml:"workdir,omitempty" json:"workdir,omitempty"`
	VolumesFrom   []VolumeFrom       `yaml:"volumes_from,omitempty" json:"volumes_from,omitempty"`
}

func (*CommonContainerAttrs) CanOverride added in v0.3.0

func (obj *CommonContainerAttrs) CanOverride() bool

func (*CommonContainerAttrs) GetCommonContainerAttrs added in v0.2.0

func (obj *CommonContainerAttrs) GetCommonContainerAttrs() CommonContainerAttrs

func (CommonContainerAttrs) NewDefaultedBy added in v0.2.0

func (*CommonContainerAttrs) TemplateFields

func (cta *CommonContainerAttrs) TemplateFields() map[string]interface{}

func (*CommonContainerAttrs) Validate

func (cta *CommonContainerAttrs) Validate() error

type CommonTaskAttrs

type CommonTaskAttrs struct {
	CommonContainerAttrs `yaml:",inline" json:",inline"`

	Storage         *StorageSpec          `yaml:"storage,omitempty" json:"storage,omitempty"`
	Architecture    *Architecture         `yaml:"arch,omitempty" json:"arch,omitempty" jsonschema:"enum=arm64,enum=amd64,description=Task CPU Architecture"`
	PlatformVersion *string               `` /* 132-byte string literal not displayed */
	Tags            []NameValuePair       `yaml:"tags,omitempty" json:"tags,omitempty"`
	Network         *NetworkConfiguration `yaml:"network,omitempty" json:"network,omitempty"`
	Sidecars        []*Sidecar            `yaml:"sidecars,omitempty" json:"sidecars,omitempty"`
	Volumes         VolumeList            `yaml:"volumes,omitempty" json:"volumes,omitempty"`
	ProxyConfig     *ProxyConfig          `yaml:"proxy,omitempty" json:"proxy,omitempty"`
}

func (*CommonTaskAttrs) CanOverride added in v0.3.0

func (obj *CommonTaskAttrs) CanOverride() bool

Determines if a task can just use an overrides when doing Predeploy/CronJobs this lets us use a shared task definition, instead of making a new one for each task

func (*CommonTaskAttrs) GetCommonContainerAttrs added in v0.2.0

func (obj *CommonTaskAttrs) GetCommonContainerAttrs() CommonContainerAttrs

func (*CommonTaskAttrs) GetCommonTaskAttrs added in v0.2.0

func (obj *CommonTaskAttrs) GetCommonTaskAttrs() CommonTaskAttrs

func (*CommonTaskAttrs) TemplateFields

func (cta *CommonTaskAttrs) TemplateFields() map[string]interface{}

func (*CommonTaskAttrs) Validate

func (cta *CommonTaskAttrs) Validate() error

type ConsoleTask

type ConsoleTask struct {
	CommonTaskAttrs `yaml:",inline" json:",inline"`

	PortMapping *PortMapping `yaml:"port,omitempty" json:"port,omitempty"`
	Enabled     *bool        `yaml:"enabled,omitempty" json:"enabled,omitempty"`
	Path        *string      `yaml:"path,omitempty" json:"path,omitempty"`
}

func (*ConsoleTask) ApplyDefaults

func (con *ConsoleTask) ApplyDefaults()

func (*ConsoleTask) IsEnabled

func (obj *ConsoleTask) IsEnabled() bool

func (ConsoleTask) JSONSchemaExtend

func (ConsoleTask) JSONSchemaExtend(base *jsonschema.Schema)

func (*ConsoleTask) MarshalJSON

func (obj *ConsoleTask) MarshalJSON() ([]byte, error)

func (*ConsoleTask) UnmarshalYAML

func (con *ConsoleTask) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*ConsoleTask) Validate

func (con *ConsoleTask) Validate() error

type Context

type Context struct {
	stdctx.Context

	Project    *Project
	Date       time.Time
	Env        ContextEnv
	Deprecated bool

	// maximum parallel goroutines to run in a given scenario
	MaxConcurrency int

	CleanOnlyFlow bool

	// app info
	Version     string
	ImageTag    string
	ImageUriRef string
	Stage       string

	Cache *ContextCache
	// contains filtered or unexported fields
}

func New

func New(config *Project) *Context

func NewFromYAML

func NewFromYAML(file string) (*Context, error)

This is mainly used in tests, and will load a project from a YAML and then instantiate a Context

func NewWithTimeout

func NewWithTimeout(project *Project, timeout time.Duration) (*Context, stdctx.CancelFunc)

NewWithTimeout new context with the given timeout.

func Wrap

func Wrap(ctx stdctx.Context, project *Project) *Context

func (*Context) AwsAccountId

func (ctx *Context) AwsAccountId() string

func (*Context) AwsRegion

func (ctx *Context) AwsRegion() string

func (*Context) ClusterName

func (ctx *Context) ClusterName() string

func (*Context) Concurrency added in v0.3.0

func (ctx *Context) Concurrency(proposal int) int

type ContextCache

type ContextCache struct {
	SSMSecretsCached bool
	SSMSecrets       map[string]EnvVar

	LogGroupsCached bool
	LogGroups       map[string]logTypes.LogGroup

	Meta map[string]interface{}
	// contains filtered or unexported fields
}

func (*ContextCache) AddTaskDefinition added in v0.3.0

func (cc *ContextCache) AddTaskDefinition(arn string)

func (*ContextCache) TaskDefinitions added in v0.3.0

func (cc *ContextCache) TaskDefinitions() []string

type ContextEnv

type ContextEnv map[string]string

func ToEnv

func ToEnv(env []string) ContextEnv

ToEnv converts a list of strings to an Env (aka a map[string]string).

type CpuSpec

type CpuSpec int32

func NewCpuSpec

func NewCpuSpec(shares int32) (*CpuSpec, error)

func ParseCpuSpec

func ParseCpuSpec(str string) (*CpuSpec, error)

Eventually, this can be used to accept "1 vcpu" or "1.5 vCPU" etc

func (*CpuSpec) ApplyDefaults

func (nc *CpuSpec) ApplyDefaults()

func (CpuSpec) JSONSchema

func (CpuSpec) JSONSchema() *jsonschema.Schema

func (CpuSpec) Shares

func (nc CpuSpec) Shares() int32

Export the CPU Shares required by this spec

func (*CpuSpec) UnmarshalYAML

func (obj *CpuSpec) UnmarshalYAML(unmarshal func(interface{}) error) error

func (CpuSpec) Validate

func (nc CpuSpec) Validate() error

type CronJob

type CronJob struct {
	CommonTaskAttrs `yaml:",inline" json:",inline"`

	Disabled    bool   `yaml:"disabled,omitempty" json:"disabled,omitempty"`
	Description string `yaml:"description,omitempty" json:"description,omitempty"`
	Schedule    string `yaml:"schedule" json:"schedule" jsonschema:"minLength=5"`

	TimeZone     *string `yaml:"timezone,omitempty" json:"timezone,omitempty"`
	EventBusName *string `yaml:"bus,omitempty" json:"bus,omitempty"`

	StartDate *time.Time `yaml:"start_date,omitempty" json:"start_date,omitempty"`
	EndDate   *time.Time `yaml:"end_date,omitempty" json:"end_date,omitempty"`
}

func (*CronJob) ApplyDefaults

func (obj *CronJob) ApplyDefaults()

func (*CronJob) IsDisabled

func (obj *CronJob) IsDisabled() bool

func (CronJob) JSONSchemaExtend

func (CronJob) JSONSchemaExtend(base *jsonschema.Schema)

func (*CronJob) UnmarshalYAML

func (obj *CronJob) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*CronJob) Validate

func (obj *CronJob) Validate() error

type CustomLogConfig added in v0.2.0

type CustomLogConfig struct {
	Driver  string    `yaml:"driver,omitempty" json:"driver,omitempty"`
	Options EnvVarMap `yaml:"options,omitempty" json:"options,omitempty"`
}

func (*CustomLogConfig) ApplyDefaults added in v0.2.0

func (obj *CustomLogConfig) ApplyDefaults()

func (*CustomLogConfig) IsDisabled added in v0.2.0

func (obj *CustomLogConfig) IsDisabled() bool

func (*CustomLogConfig) UnmarshalYAML added in v0.2.0

func (obj *CustomLogConfig) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*CustomLogConfig) Validate added in v0.2.0

func (obj *CustomLogConfig) Validate() error

type DependsOn

type DependsOn struct {
	Condition ecsTypes.ContainerCondition `yaml:"condition" json:"condition"`
	Name      *string                     `yaml:"name" json:"name"`
}

func NewDependsOnFromString

func NewDependsOnFromString(str string) (*DependsOn, error)

func (*DependsOn) ApplyDefaults

func (obj *DependsOn) ApplyDefaults()

func (DependsOn) JSONSchema

func (DependsOn) JSONSchema() *jsonschema.Schema

func (*DependsOn) UnmarshalYAML

func (a *DependsOn) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*DependsOn) Validate

func (obj *DependsOn) Validate() error

type Duration

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

func NewDurationFromString

func NewDurationFromString(val string) (Duration, error)

func NewDurationFromTDuration

func NewDurationFromTDuration(val time.Duration) Duration

func NewDurationFromUint

func NewDurationFromUint(val uint32) (Duration, error)

func (Duration) JSONSchema

func (Duration) JSONSchema() *jsonschema.Schema

func (*Duration) MarshalText added in v0.3.0

func (obj *Duration) MarshalText() ([]byte, error)

func (*Duration) String added in v0.1.0

func (obj *Duration) String() string

func (Duration) ToAwsInt32

func (obj Duration) ToAwsInt32() int32

func (Duration) ToDuration

func (obj Duration) ToDuration() time.Duration

func (*Duration) UnmarshalYAML

func (a *Duration) UnmarshalYAML(unmarshal func(interface{}) error) error

type EcsDeployerOptions

type EcsDeployerOptions struct {
	RequiredVersion *VersionConstraint `yaml:"required_version,omitempty" json:"required_version,omitempty" jsonschema:"-"`

	AllowedAccountId *string `yaml:"allowed_account_id,omitempty" json:"allowed_account_id,omitempty" jsonschema:"-"`
}

func (*EcsDeployerOptions) ApplyDefaults

func (obj *EcsDeployerOptions) ApplyDefaults()

func (EcsDeployerOptions) JSONSchema added in v0.3.0

func (EcsDeployerOptions) JSONSchema() *jsonschema.Schema

func (*EcsDeployerOptions) UnmarshalYAML added in v0.3.0

func (obj *EcsDeployerOptions) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*EcsDeployerOptions) Validate

func (obj *EcsDeployerOptions) Validate() error

type EnvVar

type EnvVar struct {
	ValueTemplate *string `yaml:"template,omitempty" json:"template,omitempty"`
	ValueSSM      *string `yaml:"ssm,omitempty" json:"ssm,omitempty"`
	Value         *string `yaml:"value,omitempty" json:"value,omitempty"`
	Unset         bool    `yaml:"unset,omitempty" json:"unset,omitempty"`
}

func NewEnvVar

func NewEnvVar(vartype EnvVarType, value string) EnvVar

func (EnvVar) GetValue

func (e EnvVar) GetValue(tplRef templater) (string, error)

func (EnvVar) IsPlain

func (e EnvVar) IsPlain() bool

func (EnvVar) IsSSM

func (e EnvVar) IsSSM() bool

func (EnvVar) IsSecret added in v0.2.0

func (e EnvVar) IsSecret() bool

func (EnvVar) IsTemplated

func (e EnvVar) IsTemplated() bool

func (EnvVar) IsUnset

func (e EnvVar) IsUnset() bool

func (EnvVar) JSONSchema

func (EnvVar) JSONSchema() *jsonschema.Schema

func (EnvVar) MarshalJSON

func (ev EnvVar) MarshalJSON() ([]byte, error)

func (*EnvVar) UnmarshalYAML

func (a *EnvVar) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*EnvVar) Validate

func (a *EnvVar) Validate() error

type EnvVarExportFunc added in v0.2.0

type EnvVarExportFunc[T any] func(string, string) T

type EnvVarMap

type EnvVarMap map[string]EnvVar

func MergeEnvVarMaps

func MergeEnvVarMaps(values ...EnvVarMap) EnvVarMap

func (EnvVarMap) Filter

func (obj EnvVarMap) Filter() EnvVarMap

Filters a map of env vars and removes any Unset values You should only use this at the very very end of an evaluation tree. (i.e. after merging parent maps)

func (EnvVarMap) HasSSM

func (obj EnvVarMap) HasSSM() bool

are any of the values inside an SSM reference

func (EnvVarMap) JSONSchemaExtend

func (EnvVarMap) JSONSchemaExtend(base *jsonschema.Schema)

type EnvVarType

type EnvVarType int
const (
	EnvVarTypePlain EnvVarType = iota
	EnvVarTypeSSM
	EnvVarTypeTemplated
	EnvVarTypeUnset
)

type FargateDefaults

type FargateDefaults struct {
	CommonTaskAttrs `yaml:",inline" json:",inline"`

	SpotOverride *SpotOverrides `yaml:"spot,omitempty" json:"spot,omitempty"`
}

func (*FargateDefaults) ApplyDefaults

func (obj *FargateDefaults) ApplyDefaults()

func (FargateDefaults) JSONSchemaExtend

func (FargateDefaults) JSONSchemaExtend(base *jsonschema.Schema)

func (*FargateDefaults) UnmarshalYAML

func (obj *FargateDefaults) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*FargateDefaults) Validate

func (obj *FargateDefaults) Validate() error

type FirelensAwsLogGroup

type FirelensAwsLogGroup struct {
	Path string
}

func (*FirelensAwsLogGroup) Enabled

func (obj *FirelensAwsLogGroup) Enabled() bool

func (FirelensAwsLogGroup) JSONSchema

func (FirelensAwsLogGroup) JSONSchema() *jsonschema.Schema

func (FirelensAwsLogGroup) MarshalJSON

func (obj FirelensAwsLogGroup) MarshalJSON() ([]byte, error)

func (*FirelensAwsLogGroup) UnmarshalYAML

func (obj *FirelensAwsLogGroup) UnmarshalYAML(unmarshal func(interface{}) error) error

type FirelensConfig

type FirelensConfig struct {
	Disabled      bool        `yaml:"disabled,omitempty" json:"disabled,omitempty"`
	Type          *string     `yaml:"type,omitempty" json:"type,omitempty"`
	Name          *string     `yaml:"container_name,omitempty" json:"container_name,omitempty"`
	Options       EnvVarMap   `yaml:"options,omitempty" json:"options,omitempty"`
	RouterOptions EnvVarMap   `yaml:"router_options,omitempty" json:"router_options,omitempty"`
	EnvVars       EnvVarMap   `yaml:"environment,omitempty" json:"environment,omitempty"`
	Credentials   *string     `yaml:"credentials,omitempty" json:"credentials,omitempty"`
	InheritEnv    *bool       `yaml:"inherit_env,omitempty" json:"inherit_env,omitempty"`
	Image         *ImageUri   `yaml:"image,omitempty" json:"image,omitempty"`
	Memory        *MemorySpec `yaml:"memory,omitempty" json:"memory,omitempty"`

	// should we log the firelens container to AWSLogs (not the app logs, but firelens itself)
	LogToAwsLogs *FirelensAwsLogGroup `yaml:"log_to_awslogs,omitempty" json:"log_to_awslogs,omitempty"`
}

func (*FirelensConfig) ApplyDefaults

func (obj *FirelensConfig) ApplyDefaults()

func (*FirelensConfig) IsDisabled

func (obj *FirelensConfig) IsDisabled() bool

func (FirelensConfig) JSONSchemaExtend

func (FirelensConfig) JSONSchemaExtend(base *jsonschema.Schema)

func (*FirelensConfig) UnmarshalYAML

func (obj *FirelensConfig) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*FirelensConfig) Validate

func (obj *FirelensConfig) Validate() error

type HealthCheck

type HealthCheck struct {
	Disabled bool `yaml:"disabled,omitempty" json:"disabled,omitempty"`

	Command     ShellCommand `yaml:"command,omitempty" json:"command,omitempty"`
	Interval    *Duration    `yaml:"interval,omitempty" json:"interval,omitempty"`
	Retries     *int32       `yaml:"retries,omitempty" json:"retries,omitempty" jsonschema_extras:"minimum=1"`
	StartPeriod *Duration    `yaml:"start_period,omitempty" json:"start_period,omitempty"`
	Timeout     *Duration    `yaml:"timeout,omitempty" json:"timeout,omitempty"`
}

func (*HealthCheck) ApplyDefaults

func (obj *HealthCheck) ApplyDefaults()

func (HealthCheck) JSONSchemaExtend added in v0.2.0

func (HealthCheck) JSONSchemaExtend(base *jsonschema.Schema)

func (*HealthCheck) UnmarshalYAML added in v0.2.0

func (obj *HealthCheck) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*HealthCheck) Validate

func (obj *HealthCheck) Validate() error

type ImageDigestAlg

type ImageDigestAlg string

type ImageUri

type ImageUri struct {
	Ecr    *string `yaml:"ecr,omitempty" json:"ecr,omitempty"`
	Docker *string `yaml:"docker,omitempty" json:"docker,omitempty"`
	Tag    *string `yaml:"tag,omitempty" json:"tag,omitempty"`
	Digest *string `yaml:"digest,omitempty" json:"digest,omitempty"`
	// contains filtered or unexported fields
}

func NewImageUri

func NewImageUri(value string) ImageUri

func (*ImageUri) ApplyDefaults

func (obj *ImageUri) ApplyDefaults()

func (*ImageUri) IsResolved

func (obj *ImageUri) IsResolved() bool

func (ImageUri) JSONSchema

func (ImageUri) JSONSchema() *jsonschema.Schema

func (*ImageUri) MarshalJSON

func (obj *ImageUri) MarshalJSON() ([]byte, error)

func (*ImageUri) MarshalYAML added in v0.3.0

func (obj *ImageUri) MarshalYAML() (interface{}, error)

func (*ImageUri) Parse

func (obj *ImageUri) Parse(value string)

func (*ImageUri) Resolve

func (img *ImageUri) Resolve(ctx *Context) (string, error)

func (*ImageUri) SetResolved

func (obj *ImageUri) SetResolved(value string)

func (*ImageUri) UnmarshalYAML

func (a *ImageUri) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*ImageUri) UsesDigest

func (img *ImageUri) UsesDigest() bool

func (*ImageUri) Validate

func (def *ImageUri) Validate() error

func (*ImageUri) Value

func (img *ImageUri) Value() string

This is how you should access this type

type IsTaskStruct

type IsTaskStruct interface {
	GetCommonTaskAttrs() CommonTaskAttrs
	GetCommonContainerAttrs() CommonContainerAttrs
}

type KeepInSync

type KeepInSync struct {
	Services        *bool `` /* 128-byte string literal not displayed */
	LogRetention    *bool `` /* 148-byte string literal not displayed */
	Cronjobs        *bool `` /* 128-byte string literal not displayed */
	TaskDefinitions *bool `yaml:"task_definitions,omitempty" json:"task_definitions,omitempty" jsonschema:"description=Deregisters old task definitions"`
}

Controls if we delete unused services/cron/predeploy

func NewKeepInSyncFromBool

func NewKeepInSyncFromBool(val bool) KeepInSync

func (*KeepInSync) AllDisabled

func (obj *KeepInSync) AllDisabled() bool

func (*KeepInSync) ApplyDefaults

func (obj *KeepInSync) ApplyDefaults()

func (*KeepInSync) GetCronjobs added in v0.3.0

func (kis *KeepInSync) GetCronjobs() bool

func (*KeepInSync) GetLogRetention added in v0.3.0

func (kis *KeepInSync) GetLogRetention() bool

func (*KeepInSync) GetServices added in v0.3.0

func (kis *KeepInSync) GetServices() bool

func (*KeepInSync) GetTaskDefinitions added in v0.3.0

func (kis *KeepInSync) GetTaskDefinitions() bool

func (KeepInSync) JSONSchemaExtend

func (KeepInSync) JSONSchemaExtend(base *jsonschema.Schema)

func (*KeepInSync) UnmarshalYAML

func (a *KeepInSync) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*KeepInSync) Validate

func (obj *KeepInSync) Validate() error

type LoadBalancer

type LoadBalancer struct {
	PortMapping *PortMapping    `yaml:"port" json:"port" jsonschema:"required"`
	TargetGroup *TargetGroupArn `yaml:"target_group" json:"target_group" jsonschema:"required"`
	GracePeriod *Duration       `yaml:"grace,omitempty" json:"grace,omitempty"`
}

func (*LoadBalancer) ApplyDefaults

func (nc *LoadBalancer) ApplyDefaults()

func (*LoadBalancer) UnmarshalYAML

func (a *LoadBalancer) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*LoadBalancer) Validate

func (obj *LoadBalancer) Validate() error

type LoadBalancers

type LoadBalancers []LoadBalancer

func (LoadBalancers) GetHealthCheckGracePeriod

func (lbs LoadBalancers) GetHealthCheckGracePeriod() *int32

func (LoadBalancers) JSONSchemaExtend

func (LoadBalancers) JSONSchemaExtend(base *jsonschema.Schema)

func (*LoadBalancers) UnmarshalYAML

func (a *LoadBalancers) UnmarshalYAML(unmarshal func(interface{}) error) error

type LogRetention

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

func ParseLogRetention

func ParseLogRetention[T int32 | int64 | int | string](value T) (LogRetention, error)

func (*LogRetention) Days

func (obj *LogRetention) Days() int32

func (*LogRetention) EqualsLogGroup

func (obj *LogRetention) EqualsLogGroup(group logTypes.LogGroup) bool

func (*LogRetention) Forever

func (obj *LogRetention) Forever() bool

func (LogRetention) JSONSchema

func (LogRetention) JSONSchema() *jsonschema.Schema

func (LogRetention) MarshalJSON

func (obj LogRetention) MarshalJSON() ([]byte, error)

func (LogRetention) MarshalYAML added in v0.3.0

func (obj LogRetention) MarshalYAML() (interface{}, error)

func (*LogRetention) ToAwsInt32

func (obj *LogRetention) ToAwsInt32() *int32

func (*LogRetention) UnmarshalYAML

func (a *LogRetention) UnmarshalYAML(unmarshal func(interface{}) error) error

type LoggingConfig

type LoggingConfig struct {
	Disabled       bool             `yaml:"disabled,omitempty" json:"disabled,omitempty"`
	FirelensConfig *FirelensConfig  `yaml:"firelens,omitempty" json:"firelens,omitempty"`
	AwsLogConfig   *AwsLogConfig    `yaml:"awslogs,omitempty" json:"awslogs,omitempty"`
	Custom         *CustomLogConfig `yaml:"custom,omitempty" json:"custom,omitempty"`
}

Project level

func (*LoggingConfig) ApplyDefaults

func (obj *LoggingConfig) ApplyDefaults()

func (*LoggingConfig) IsDisabled

func (obj *LoggingConfig) IsDisabled() bool

func (LoggingConfig) JSONSchemaExtend

func (LoggingConfig) JSONSchemaExtend(base *jsonschema.Schema)

func (*LoggingConfig) MarshalJSON added in v0.3.0

func (obj *LoggingConfig) MarshalJSON() ([]byte, error)

func (*LoggingConfig) MarshalYAML added in v0.3.0

func (obj *LoggingConfig) MarshalYAML() (interface{}, error)

func (*LoggingConfig) Type added in v0.2.0

func (obj *LoggingConfig) Type() LoggingType

func (*LoggingConfig) UnmarshalYAML

func (obj *LoggingConfig) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*LoggingConfig) Validate

func (obj *LoggingConfig) Validate() error

type LoggingType added in v0.2.0

type LoggingType uint8
const (
	LoggingTypeDisabled LoggingType = iota
	LoggingTypeAwslogs
	LoggingTypeFirelens
	LoggingTypeCustom
)

type MemorySpec

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

func ParseMemorySpec

func ParseMemorySpec(str string) (*MemorySpec, error)

func (*MemorySpec) Equals

func (m *MemorySpec) Equals(other *MemorySpec) bool

func (*MemorySpec) GetValueOnly

func (m *MemorySpec) GetValueOnly() int32

func (MemorySpec) JSONSchema

func (MemorySpec) JSONSchema() *jsonschema.Schema

func (MemorySpec) MarshalJSON

func (obj MemorySpec) MarshalJSON() ([]byte, error)

func (MemorySpec) MarshalYAML added in v0.3.0

func (obj MemorySpec) MarshalYAML() (interface{}, error)

func (*MemorySpec) MegabytesFromCpu

func (m *MemorySpec) MegabytesFromCpu(cpu *CpuSpec) (int32, error)

func (*MemorySpec) MegabytesPtrFromCpu

func (m *MemorySpec) MegabytesPtrFromCpu(cpu *CpuSpec) (*int32, error)

func (*MemorySpec) UnmarshalYAML

func (obj *MemorySpec) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*MemorySpec) Validate

func (m *MemorySpec) Validate() error

type Mount added in v0.2.0

type Mount struct {
	ContainerPath string `yaml:"path" json:"path"`
	SourceVolume  string `yaml:"source" json:"source"`
	ReadOnly      bool   `yaml:"readonly,omitempty" json:"readonly,omitempty"`
}

func (*Mount) ApplyDefaults added in v0.2.0

func (obj *Mount) ApplyDefaults()

func (*Mount) ToAws added in v0.2.0

func (obj *Mount) ToAws() ecsTypes.MountPoint

func (*Mount) UnmarshalYAML added in v0.2.0

func (obj *Mount) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*Mount) Validate added in v0.2.0

func (obj *Mount) Validate() error

type NameArn

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

func (*NameArn) AwsArn

func (obj *NameArn) AwsArn(ctx *Context, resolve resolverFunc) (*arn.ARN, error)

func (*NameArn) InferArn

func (obj *NameArn) InferArn(ctx *Context) (string, error)

This tries to resolve the ARN THESE SHOULD BE OVERRIDDEN BY CHILD STRUCTS DO NOT CACHE WITHIN

func (*NameArn) InferName

func (obj *NameArn) InferName(ctx *Context) (string, error)

THESE SHOULD BE OVERRIDDEN BY CHILD STRUCTS DO NOT CACHE WITHIN

func (NameArn) JSONSchema

func (NameArn) JSONSchema() *jsonschema.Schema

func (*NameArn) MarshalText added in v0.3.0

func (obj *NameArn) MarshalText() ([]byte, error)

func (*NameArn) Name

func (obj *NameArn) Name(ctx *Context) (string, error)

func (*NameArn) ParseFromString

func (obj *NameArn) ParseFromString(value string) error

func (*NameArn) UnmarshalYAML

func (obj *NameArn) UnmarshalYAML(unmarshal func(interface{}) error) error

only parses a string

func (*NameArn) Validate

func (obj *NameArn) Validate() error

type NameTemplates

type NameTemplates struct {
	TaskFamily         *string `yaml:"task_family,omitempty" json:"task_family,omitempty" jsonschema:"minLength=1"`
	ServiceName        *string `yaml:"service_name,omitempty" json:"service_name,omitempty" jsonschema:"minLength=1"`
	CronGroup          *string `yaml:"cron_group,omitempty" json:"cron_group,omitempty"`
	ScheduleGroupName  *string `yaml:"schedule_group,omitempty" json:"schedule_group,omitempty" jsonschema:"minLength=1"`
	ScheduleName       *string `yaml:"schedule,omitempty" json:"schedule,omitempty" jsonschema:"minLength=1"`
	PreDeployGroup     *string `yaml:"predeploy_group,omitempty" json:"predeploy_group,omitempty"`
	PreDeployStartedBy *string `yaml:"predeploy_started_by,omitempty" json:"predeploy_started_by,omitempty"`
	LogGroup           *string `yaml:"log_group,omitempty" json:"log_group,omitempty" jsonschema:"minLength=1"`
	LogStreamPrefix    *string `yaml:"log_stream_prefix,omitempty" json:"log_stream_prefix,omitempty" jsonschema:"minLength=1"`
	TargetGroup        *string `yaml:"target_group,omitempty" json:"target_group,omitempty" jsonschema:"minLength=1"`
	MarkerTagKey       *string `yaml:"marker_tag_key,omitempty" json:"marker_tag_key,omitempty" jsonschema:"minLength=1"`
	MarkerTagValue     *string `yaml:"marker_tag_value,omitempty" json:"marker_tag_value,omitempty" jsonschema:"minLength=1"`

	// old
	CronRule   *string `yaml:"cron_rule,omitempty" json:"cron_rule,omitempty" jsonschema:"minLength=1" jsonschema_extras:"deprecated=true"`
	CronTarget *string `yaml:"cron_target,omitempty" json:"cron_target,omitempty" jsonschema:"minLength=1" jsonschema_extras:"deprecated=true"`

	// For the shared task definition names
	SharedTaskPD   *string `yaml:"shared_task_predeploy,omitempty" json:"shared_task_predeploy,omitempty" jsonschema:"-"`
	SharedTaskCron *string `yaml:"shared_task_cron,omitempty" json:"shared_task_cron,omitempty" jsonschema:"-"`

	// removed
	ContainerName *string `yaml:"container,omitempty" json:"container,omitempty" jsonschema:"-"`
}

func (*NameTemplates) ApplyDefaults

func (def *NameTemplates) ApplyDefaults()

func (NameTemplates) JSONSchemaExtend

func (NameTemplates) JSONSchemaExtend(base *jsonschema.Schema)

func (*NameTemplates) UnmarshalYAML

func (a *NameTemplates) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*NameTemplates) Validate

func (nt *NameTemplates) Validate() error

type NameValuePair

type NameValuePair struct {
	Name  *string `yaml:"name" json:"name"`
	Value *string `yaml:"value" json:"value"`
}

func NewNameValuePair added in v0.2.0

func NewNameValuePair(k, v string) NameValuePair

func (NameValuePair) JSONSchema

func (NameValuePair) JSONSchema() *jsonschema.Schema

func (*NameValuePair) UnmarshalYAML

func (a *NameValuePair) UnmarshalYAML(unmarshal func(interface{}) error) error

func (NameValuePair) Validate

func (def NameValuePair) Validate() error

type NetworkConfiguration

type NetworkConfiguration struct {
	Subnets        []NetworkFilter `yaml:"subnets,omitempty" json:"subnets,omitempty" jsonschema:"description=List of SubnetIds or Subnet Filters"`
	SecurityGroups []NetworkFilter `` /* 140-byte string literal not displayed */
	AllowPublicIp  *bool           `` /* 138-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*NetworkConfiguration) ApplyDefaults

func (nc *NetworkConfiguration) ApplyDefaults()

func (*NetworkConfiguration) IsResolveError

func (nc *NetworkConfiguration) IsResolveError() bool

func (*NetworkConfiguration) IsResolved

func (nc *NetworkConfiguration) IsResolved() bool

func (*NetworkConfiguration) Resolve added in v0.2.0

func (nc *NetworkConfiguration) Resolve(ctx *Context, netConfRef any) error

Good thing AWS has a bunch of different incompatible, yet identical types. Neat

func (*NetworkConfiguration) UnmarshalYAML

func (a *NetworkConfiguration) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*NetworkConfiguration) Validate

func (nc *NetworkConfiguration) Validate() error

type NetworkFilter

type NetworkFilter struct {
	ID     *string  `yaml:"id,omitempty" json:"id,omitempty"`
	Name   *string  `yaml:"name,omitempty" json:"name,omitempty"`
	Values []string `yaml:"values,omitempty" json:"values,omitempty"`
}

func (*NetworkFilter) IdSpecified

func (nf *NetworkFilter) IdSpecified() bool

func (NetworkFilter) JSONSchema

func (NetworkFilter) JSONSchema() *jsonschema.Schema

func (*NetworkFilter) MarshalJSON

func (obj *NetworkFilter) MarshalJSON() ([]byte, error)

func (*NetworkFilter) ToAws

func (nf *NetworkFilter) ToAws() ec2Types.Filter

This doesn't allow templates... but that's ok for first release

func (*NetworkFilter) UnmarshalYAML

func (a *NetworkFilter) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*NetworkFilter) Validate

func (nf *NetworkFilter) Validate() error

type PortMapping

type PortMapping struct {
	Port     *int32                     `yaml:"port" json:"port"`
	Protocol ecsTypes.TransportProtocol `yaml:"protocol" json:"protocol"`
}

func NewPortMappingFromString

func NewPortMappingFromString(value string) (*PortMapping, error)

func (*PortMapping) ApplyDefaults

func (obj *PortMapping) ApplyDefaults()

func (PortMapping) JSONSchema

func (PortMapping) JSONSchema() *jsonschema.Schema

func (*PortMapping) ToAwsPortMapping

func (obj *PortMapping) ToAwsPortMapping() ecsTypes.PortMapping

func (*PortMapping) UnmarshalYAML

func (obj *PortMapping) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*PortMapping) Validate

func (obj *PortMapping) Validate() error

type PreDeployTask

type PreDeployTask struct {
	CommonTaskAttrs `yaml:",inline" json:",inline"`

	Timeout       *Duration `yaml:"timeout,omitempty" json:"timeout,omitempty" jsonschema:"description=Abort task after specified time has elapsed"`
	Disabled      bool      `yaml:"disabled,omitempty" json:"disabled,omitempty" jsonschema:"default=false,description=Do not run this task"`
	IgnoreFailure bool      `` /* 139-byte string literal not displayed */
	DoNotWait     bool      `` /* 152-byte string literal not displayed */
}

func (*PreDeployTask) ApplyDefaults

func (obj *PreDeployTask) ApplyDefaults()

func (PreDeployTask) JSONSchemaExtend

func (PreDeployTask) JSONSchemaExtend(base *jsonschema.Schema)

func (*PreDeployTask) Validate

func (obj *PreDeployTask) Validate() error

type Project

type Project struct {
	EcsDeployerOptions *EcsDeployerOptions `yaml:"ecsdeployer,omitempty" json:"ecsdeployer,omitempty"`

	ProjectName      string                `yaml:"project" json:"project"`
	StageName        *string               `yaml:"stage,omitempty" json:"stage,omitempty"`
	Image            *ImageUri             `yaml:"image,omitempty" json:"image,omitempty"`
	Role             *RoleArn              `yaml:"role,omitempty" json:"role,omitempty"`
	ExecutionRole    *RoleArn              `yaml:"execution_role,omitempty" json:"execution_role,omitempty"`
	CronLauncherRole *RoleArn              `yaml:"cron_launcher_role,omitempty" json:"cron_launcher_role,omitempty"`
	ServiceRole      *RoleArn              `yaml:"service_role,omitempty" json:"service_role,omitempty"`
	Services         []*Service            `yaml:"services,omitempty" json:"services,omitempty"`
	CronJobs         []*CronJob            `yaml:"cronjobs,omitempty" json:"cronjobs,omitempty"`
	PreDeployTasks   []*PreDeployTask      `yaml:"predeploy,omitempty" json:"predeploy,omitempty"`
	ConsoleTask      *ConsoleTask          `yaml:"console,omitempty" json:"console,omitempty"`
	EnvVars          EnvVarMap             `yaml:"environment,omitempty" json:"environment,omitempty"`
	TaskDefaults     *FargateDefaults      `yaml:"task_defaults,omitempty" json:"task_defaults,omitempty"`
	Templates        *NameTemplates        `yaml:"name_templates,omitempty" json:"name_templates,omitempty"`
	Logging          *LoggingConfig        `yaml:"logging,omitempty" json:"logging,omitempty"`
	Tags             []NameValuePair       `yaml:"tags,omitempty" json:"tags,omitempty"`
	Network          *NetworkConfiguration `yaml:"network,omitempty" json:"network,omitempty"`
	Cluster          *ClusterArn           `yaml:"cluster" json:"cluster"`
	Settings         *Settings             `yaml:"settings,omitempty" json:"settings,omitempty"`

	// This is used to allow YAML aliases. It is not serialized
	Aliases map[string]interface{} `yaml:"aliases,omitempty" json:"-" jsonschema:"-"`

	Env []string `yaml:"env,omitempty" json:"env,omitempty" jsonschema:"-"` // this is generic environment, not for the app
}

func Load

func Load(file string) (*Project, error)

Load config file.

func LoadFromBytes

func LoadFromBytes(data []byte) (*Project, error)

func LoadReader

func LoadReader(fd io.Reader) (*Project, error)

LoadReader config via io.Reader.

func (*Project) ApplyDefaults

func (project *Project) ApplyDefaults()

func (*Project) ApproxNumTasks

func (obj *Project) ApproxNumTasks() int

how many tasks are we expecting to make?

func (Project) JSONSchemaExtend

func (Project) JSONSchemaExtend(base *jsonschema.Schema)

func (*Project) UnmarshalYAML

func (obj *Project) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*Project) Validate

func (project *Project) Validate() error

func (*Project) ValidateWithContext

func (project *Project) ValidateWithContext(ctx *Context) error

type ProxyConfig added in v0.2.0

type ProxyConfig struct {
	Disabled bool `yaml:"disabled,omitempty" json:"disabled,omitempty"`

	Type          *string   `yaml:"type,omitempty" json:"type,omitempty"`
	ContainerName *string   `yaml:"container,omitempty" json:"container,omitempty"`
	Properties    EnvVarMap `yaml:"properties,omitempty" json:"properties,omitempty"`
}

func (*ProxyConfig) ApplyDefaults added in v0.2.0

func (nc *ProxyConfig) ApplyDefaults()

func (ProxyConfig) JSONSchemaExtend added in v0.2.0

func (ProxyConfig) JSONSchemaExtend(base *jsonschema.Schema)

func (*ProxyConfig) UnmarshalYAML added in v0.2.0

func (obj *ProxyConfig) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*ProxyConfig) Validate added in v0.2.0

func (nc *ProxyConfig) Validate() error

type RoleArn

type RoleArn struct {
	NameArn
}

func (*RoleArn) Arn

func (obj *RoleArn) Arn(ctx *Context) (string, error)

type RolloutConfig

type RolloutConfig struct {
	Minimum *int32 `yaml:"min" json:"min" jsonschema:"required" jsonschema_extras:"minimum=0"`
	Maximum *int32 `yaml:"max" json:"max" jsonschema:"required" jsonschema_extras:"minimum=0"`
}

func NewDeploymentConfigFromService

func NewDeploymentConfigFromService(svc *Service) *RolloutConfig

func (*RolloutConfig) GetAwsConfig

func (dc *RolloutConfig) GetAwsConfig() *ecsTypes.DeploymentConfiguration

func (*RolloutConfig) GetMinMaxCount

func (obj *RolloutConfig) GetMinMaxCount(count int32) (int32, int32)

func (*RolloutConfig) MaximumPercent

func (obj *RolloutConfig) MaximumPercent() float64

func (*RolloutConfig) MinimumPercent

func (obj *RolloutConfig) MinimumPercent() float64

func (*RolloutConfig) UnmarshalYAML

func (a *RolloutConfig) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*RolloutConfig) Validate

func (def *RolloutConfig) Validate() error

func (*RolloutConfig) ValidateWithDesiredCount

func (obj *RolloutConfig) ValidateWithDesiredCount(count int32) error

type SSMImport

type SSMImport struct {
	Enabled   bool    `yaml:"enabled,omitempty" json:"enabled,omitempty"`
	Path      *string `yaml:"path,omitempty" json:"path,omitempty"`
	Recursive *bool   `` /* 146-byte string literal not displayed */
}

func (*SSMImport) ApplyDefaults

func (obj *SSMImport) ApplyDefaults()

func (*SSMImport) GetPath

func (obj *SSMImport) GetPath() string

func (*SSMImport) IsEnabled

func (obj *SSMImport) IsEnabled() bool

func (SSMImport) JSONSchemaExtend

func (SSMImport) JSONSchemaExtend(base *jsonschema.Schema)

func (*SSMImport) MarshalJSON

func (obj *SSMImport) MarshalJSON() ([]byte, error)

func (*SSMImport) UnmarshalYAML

func (a *SSMImport) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*SSMImport) Validate

func (obj *SSMImport) Validate() error

type Service

type Service struct {
	CommonTaskAttrs `yaml:",inline" json:",inline"`

	DesiredCount  int32          `yaml:"desired,omitempty" json:"desired,omitempty"`
	RolloutConfig *RolloutConfig `yaml:"rollout,omitempty" json:"rollout,omitempty"`

	SkipWaitForStable bool `` /* 184-byte string literal not displayed */

	SpotOverride *SpotOverrides `yaml:"spot,omitempty" json:"spot,omitempty"`

	LoadBalancers LoadBalancers `yaml:"load_balancer,omitempty" json:"load_balancer,omitempty"`
}

func (*Service) ApplyDefaults

func (obj *Service) ApplyDefaults()

func (*Service) IsLoadBalanced

func (svc *Service) IsLoadBalanced() bool

func (*Service) IsWorker

func (svc *Service) IsWorker() bool

func (Service) JSONSchemaExtend

func (Service) JSONSchemaExtend(base *jsonschema.Schema)

func (*Service) UnmarshalYAML

func (a *Service) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*Service) Validate

func (obj *Service) Validate() error

type Settings

type Settings struct {
	// PreDeployParallel *bool     `yaml:"predeploy_parallel,omitempty" json:"predeploy_parallel,omitempty"`
	PreDeployTimeout *Duration `yaml:"predeploy_timeout,omitempty" json:"predeploy_timeout,omitempty"`

	SkipDeploymentEnvVars bool `yaml:"skip_deployment_env_vars,omitempty" json:"skip_deployment_env_vars,omitempty"`
	SkipCronEnvVars       bool `yaml:"skip_cron_env_vars,omitempty" json:"skip_cron_env_vars,omitempty"`

	DisableMarkerTag bool        `yaml:"disable_marker_tag,omitempty" json:"disable_marker_tag,omitempty"`
	KeepInSync       *KeepInSync `yaml:"keep_in_sync,omitempty" json:"keep_in_sync,omitempty"`

	WaitForStable *WaitForStable `yaml:"wait_for_stable,omitempty" json:"wait_for_stable,omitempty"`

	// Use the older eventbridge target/rule style to do cronjobs
	CronUsesEventing bool `yaml:"use_old_cron_eventbus,omitempty" json:"use_old_cron_eventbus,omitempty"`

	// Block sharing task defs for cron/predeploy tasks
	DisableSharedTaskDef bool `yaml:"disable_shared_taskdefs,omitempty" json:"disable_shared_taskdefs,omitempty" jsonschema:"-"`

	SSMImport *SSMImport `yaml:"ssm_import,omitempty" json:"ssm_import,omitempty"`
}

func (*Settings) ApplyDefaults

func (obj *Settings) ApplyDefaults()

func (*Settings) UnmarshalYAML

func (a *Settings) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*Settings) Validate

func (obj *Settings) Validate() error

type ShellCommand

type ShellCommand []string

ShellCommand is a wrapper for an array of strings.

func (ShellCommand) JSONSchema

func (a ShellCommand) JSONSchema() *jsonschema.Schema

func (ShellCommand) String

func (sc ShellCommand) String() string

func (*ShellCommand) UnmarshalYAML

func (a *ShellCommand) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML is a custom unmarshaler that wraps strings in arrays.

type Sidecar

type Sidecar struct {
	CommonContainerAttrs `yaml:",inline" json:",inline"`

	InheritEnv        bool          `yaml:"inherit_env,omitempty" json:"inherit_env,omitempty"`
	PortMappings      []PortMapping `yaml:"port_mappings,omitempty" json:"port_mappings,omitempty"`
	MemoryReservation *MemorySpec   `yaml:"memory_reservation,omitempty" json:"memory_reservation,omitempty"`
	Essential         *bool         `yaml:"essential,omitempty" json:"essential,omitempty"`
}

func (*Sidecar) ApplyDefaults

func (obj *Sidecar) ApplyDefaults()

func (*Sidecar) GetCommonContainerAttrs added in v0.2.0

func (obj *Sidecar) GetCommonContainerAttrs() CommonContainerAttrs

func (Sidecar) JSONSchemaExtend added in v0.2.0

func (Sidecar) JSONSchemaExtend(base *jsonschema.Schema)

func (*Sidecar) UnmarshalYAML

func (obj *Sidecar) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*Sidecar) Validate

func (obj *Sidecar) Validate() error

type SpotOverrides

type SpotOverrides struct {
	Enabled bool `yaml:"enabled,omitempty" json:"enabled,omitempty" jsonschema:"default=false,description=Enable Fargate Spot"`

	MinimumOnDemand        *int32 `yaml:"minimum_ondemand,omitempty" json:"minimum_ondemand,omitempty"`
	MinimumOnDemandPercent *int32 `yaml:"minimum_ondemand_percent,omitempty" json:"minimum_ondemand_percent,omitempty"`
}

func NewSpotOnDemand

func NewSpotOnDemand() *SpotOverrides

func (*SpotOverrides) ApplyDefaults

func (obj *SpotOverrides) ApplyDefaults()

func (*SpotOverrides) ExportCapacityStrategy

func (obj *SpotOverrides) ExportCapacityStrategy() []ecsTypes.CapacityProviderStrategyItem

func (*SpotOverrides) ExportCapacityStrategyEventBridge

func (obj *SpotOverrides) ExportCapacityStrategyEventBridge() []eventTypes.CapacityProviderStrategyItem

func (*SpotOverrides) ExportCapacityStrategyScheduler added in v0.1.0

func (obj *SpotOverrides) ExportCapacityStrategyScheduler() []schedulerTypes.CapacityProviderStrategyItem

func (*SpotOverrides) IsDisabled

func (obj *SpotOverrides) IsDisabled() bool

func (SpotOverrides) JSONSchema

func (SpotOverrides) JSONSchema() *jsonschema.Schema

func (*SpotOverrides) MarshalJSON

func (obj *SpotOverrides) MarshalJSON() ([]byte, error)

func (*SpotOverrides) MarshalYAML added in v0.3.0

func (obj *SpotOverrides) MarshalYAML() (interface{}, error)

func (*SpotOverrides) UnmarshalYAML

func (obj *SpotOverrides) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*SpotOverrides) Validate

func (obj *SpotOverrides) Validate() error

func (*SpotOverrides) WantsOnDemand

func (obj *SpotOverrides) WantsOnDemand() bool

type StorageSpec

type StorageSpec int32

func NewStorageSpec

func NewStorageSpec(gb int32) (*StorageSpec, error)

func (StorageSpec) Gigabytes

func (ss StorageSpec) Gigabytes() int32

func (StorageSpec) JSONSchema

func (StorageSpec) JSONSchema() *jsonschema.Schema

func (StorageSpec) ToAws added in v0.2.0

type TargetGroupArn

type TargetGroupArn struct {
	NameArn
}

func (*TargetGroupArn) Arn

func (obj *TargetGroupArn) Arn(ctx *Context) (string, error)

type TaskLoggingConfig

type TaskLoggingConfig struct {
	Driver  *string   `yaml:"driver,omitempty" json:"driver,omitempty"`
	Options EnvVarMap `yaml:"options,omitempty" json:"options,omitempty"`
}

func (*TaskLoggingConfig) ApplyDefaults

func (obj *TaskLoggingConfig) ApplyDefaults()

func (*TaskLoggingConfig) IsDisabled

func (obj *TaskLoggingConfig) IsDisabled() bool

func (TaskLoggingConfig) JSONSchemaExtend

func (TaskLoggingConfig) JSONSchemaExtend(base *jsonschema.Schema)

func (*TaskLoggingConfig) UnmarshalYAML

func (obj *TaskLoggingConfig) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*TaskLoggingConfig) Validate

func (obj *TaskLoggingConfig) Validate() error

type Ulimit added in v0.2.0

type Ulimit struct {
	Name string `yaml:"name" json:"name"`
	Hard *int32 `yaml:"hard" json:"hard"`
	Soft *int32 `yaml:"soft" json:"soft"`
}

func (*Ulimit) ApplyDefaults added in v0.2.0

func (obj *Ulimit) ApplyDefaults()

func (Ulimit) JSONSchema added in v0.2.0

func (Ulimit) JSONSchema() *jsonschema.Schema

func (*Ulimit) ToAws added in v0.2.0

func (obj *Ulimit) ToAws() ecsTypes.Ulimit

func (*Ulimit) UnmarshalYAML added in v0.2.0

func (obj *Ulimit) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*Ulimit) Validate added in v0.2.0

func (obj *Ulimit) Validate() error

type ValidationError

type ValidationError struct {
	Reason string
	Err    error
}

func NewValidationError

func NewValidationError(value any, values ...any) *ValidationError

Builds a new validation error If first parameter is an 'error', then validation error will wrap that First parameter is a string with optional format, followed by values to be formatted the last value may be an error object. if present, that will be wrapped. do not include it in your format string

func (*ValidationError) Error

func (ve *ValidationError) Error() string

func (*ValidationError) Is

func (ve *ValidationError) Is(err error) bool

func (*ValidationError) Unwrap

func (ve *ValidationError) Unwrap() error

type VersionConstraint

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

type VersionConstraint semver.Constraints

func NewVersionConstraint

func NewVersionConstraint(value string) (*VersionConstraint, error)

func (*VersionConstraint) Check

func (obj *VersionConstraint) Check(ver *hcVersion.Version) bool

func (*VersionConstraint) Constraints added in v0.3.0

func (obj *VersionConstraint) Constraints() hcVersion.Constraints

func (VersionConstraint) JSONSchema

func (VersionConstraint) JSONSchema() *jsonschema.Schema

func (VersionConstraint) MarshalJSON

func (obj VersionConstraint) MarshalJSON() ([]byte, error)

func (*VersionConstraint) String

func (obj *VersionConstraint) String() string

func (*VersionConstraint) UnmarshalYAML

func (a *VersionConstraint) UnmarshalYAML(unmarshal func(interface{}) error) error

type Volume added in v0.2.0

type Volume struct {
	Name      string           `yaml:"name" json:"name"`
	EFSConfig *VolumeEFSConfig `yaml:"efs,omitempty" json:"efs,omitempty"`
}

func (*Volume) ApplyDefaults added in v0.2.0

func (obj *Volume) ApplyDefaults()

func (Volume) JSONSchemaExtend added in v0.2.0

func (Volume) JSONSchemaExtend(base *jsonschema.Schema)

func (*Volume) ToAws added in v0.2.0

func (obj *Volume) ToAws() ecsTypes.Volume

func (*Volume) UnmarshalYAML added in v0.2.0

func (obj *Volume) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*Volume) Validate added in v0.2.0

func (obj *Volume) Validate() error

type VolumeEFSConfig added in v0.2.0

type VolumeEFSConfig struct {
	FileSystemId      string  `yaml:"file_system_id" json:"file_system_id"`
	AccessPointId     *string `yaml:"access_point_id,omitempty" json:"access_point_id,omitempty"`
	RootDirectory     *string `yaml:"root,omitempty" json:"root,omitempty"`
	DisableIAM        bool    `yaml:"disable_iam,omitempty" json:"disable_iam,omitempty"`
	DisableEncryption bool    `yaml:"disable_encryption,omitempty" json:"disable_encryption,omitempty"`
}

func (*VolumeEFSConfig) ApplyDefaults added in v0.2.0

func (obj *VolumeEFSConfig) ApplyDefaults()

func (*VolumeEFSConfig) ToAws added in v0.2.0

func (*VolumeEFSConfig) UnmarshalYAML added in v0.2.0

func (obj *VolumeEFSConfig) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*VolumeEFSConfig) Validate added in v0.2.0

func (obj *VolumeEFSConfig) Validate() error

type VolumeFrom added in v0.2.0

type VolumeFrom struct {
	SourceContainer string `yaml:"source" json:"source"`
	ReadOnly        bool   `yaml:"readonly,omitempty" json:"readonly,omitempty"`
}

func (*VolumeFrom) ApplyDefaults added in v0.2.0

func (obj *VolumeFrom) ApplyDefaults()

func (VolumeFrom) JSONSchemaExtend added in v0.2.0

func (VolumeFrom) JSONSchemaExtend(base *jsonschema.Schema)

func (*VolumeFrom) ToAws added in v0.2.0

func (obj *VolumeFrom) ToAws() ecsTypes.VolumeFrom

func (*VolumeFrom) UnmarshalYAML added in v0.2.0

func (obj *VolumeFrom) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*VolumeFrom) Validate added in v0.2.0

func (obj *VolumeFrom) Validate() error

type VolumeList added in v0.2.0

type VolumeList map[string]Volume

func MergeVolumeLists added in v0.2.0

func MergeVolumeLists(volumeLists ...VolumeList) VolumeList

func (VolumeList) JSONSchemaExtend added in v0.2.0

func (VolumeList) JSONSchemaExtend(base *jsonschema.Schema)

func (VolumeList) ToAws added in v0.2.0

func (vlist VolumeList) ToAws() []ecsTypes.Volume

func (*VolumeList) UnmarshalYAML added in v0.2.0

func (obj *VolumeList) UnmarshalYAML(unmarshal func(interface{}) error) error

func (VolumeList) Validate added in v0.2.0

func (list VolumeList) Validate() error

type WaitForStable

type WaitForStable struct {
	Disabled bool      `yaml:"disabled,omitempty" json:"disabled,omitempty"`
	Timeout  *Duration `yaml:"timeout,omitempty" json:"timeout,omitempty"`
}

func (*WaitForStable) ApplyDefaults

func (obj *WaitForStable) ApplyDefaults()

func (*WaitForStable) IsDisabled

func (wfs *WaitForStable) IsDisabled() bool

func (WaitForStable) JSONSchemaExtend

func (WaitForStable) JSONSchemaExtend(base *jsonschema.Schema)

func (*WaitForStable) UnmarshalYAML

func (a *WaitForStable) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*WaitForStable) Validate

func (def *WaitForStable) Validate() error

Jump to

Keyboard shortcuts

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