stacks

package
v0.0.0-...-42c7daa Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InvokeAction       string = "invoke"
	InvokeLambdaAction string = "lambda:InvokeFunction"

	LambdaService string = "Lambda"

	PhysicalResourceId string = "id"

	EventInvocation string = "Event"
)
View Source
const (
	BuildArtifactName string = "BuildArtifact"
	BuildStageName    string = "Build"
	BuildActionName   string = "DockerBuildPush"
	BuildImageSpec    string = "buildspec.yaml"
	BuildImageTag     string = "latest"

	BuildLambdaAsset   string = "../scripts/trigger-build.mjs"
	BuildLambdaHandler string = "trigger-build.handler"

	SourceArtifactName string = "SourceArtifact"
	SourceStageName    string = "Source"
	SourceActionName   string = "CodeCommit"

	DeployStageName  string = "Deploy"
	DeployActionName string = "EcsFargateDeploy"
	DeployFilePath   string = "./deployment.zip"
	DeployBranch     string = "main"

	CodeBuildStartBuildAction string = "codebuild:StartBuild"
	PrivilegedBuildEnv        bool   = true
	UseLatestSdk              bool   = true
)

Variables

This section is empty.

Functions

func BuildStage

func BuildStage(buildArtifact pipeline.Artifact, buildImage codebuild.IProject) *pipeline.StageProps

func CustomLambdaTrigger

func CustomLambdaTrigger(scope constructs.Construct, id string, props *LambdaTriggerProps) custom.AwsCustomResource

CustomLambdaTrigger triggers a Lambda function using AWS SDK

func DeployStage

func DeployStage(buildArtifact pipeline.Artifact, deploymentGroup codedeploy.IEcsDeploymentGroup) *pipeline.StageProps

func NewAlb

func NewAlb(scope constructs.Construct, id string, props *AlbProps) elb.ApplicationLoadBalancer

func NewAlbSecurityGroup

func NewAlbSecurityGroup(scope constructs.Construct, id string, props *SecurityGroupProps) ec2.SecurityGroup

func NewDeployPipelineStack

func NewDeployPipelineStack(scope constructs.Construct, id string, props *PipelineNestedStackProps) awscdk.Stack

func NewDeploymentGroup

func NewDeploymentGroup(scope constructs.Construct, id string, props *DeploymentGroupProps) codedeploy.EcsDeploymentGroup

func NewEcrRepository

func NewEcrRepository(scope constructs.Construct, id string, props *EcrRepositoryProps) ecr.Repository

func NewEcsCluster

func NewEcsCluster(scope constructs.Construct, id string, props *EcsClusterProps) ecs.ICluster

func NewFargateService

func NewFargateService(scope constructs.Construct, id string, props *FargateServiceProps) ecs.FargateService

func NewFargateTaskDefinition

func NewFargateTaskDefinition(scope constructs.Construct, id string, props *FargateTaskDefinitionProps) ecs.FargateTaskDefinition

func NewLambda

func NewLambda(scope constructs.Construct, id string, props *LambdaProps) lambda.Function

func NewLogDriver

func NewLogDriver(scope constructs.Construct, props *LogDriverProps) ecs.LogDriver

func NewProject

func NewProject(scope constructs.Construct, id string, props *ProjectProps) codebuild.Project

func NewRepository

func NewRepository(scope constructs.Construct, id string, props *RepositoryProps) codecommit.Repository

func NewTargetGroup

func NewTargetGroup(scope constructs.Construct, id string, props *TargetGroupProps) elb.ApplicationTargetGroup

func NewVpc

func NewVpc(scope constructs.Construct, id string, props *VpcProps) ec2.Vpc

func SourceStage

func SourceStage(source pipeline.Artifact, codeRepo codecommit.IRepository) *pipeline.StageProps

Types

type AlbProps

type AlbProps struct {
	Vpc            ec2.Vpc
	SecurityGroups ec2.ISecurityGroup
	InternetFacing bool
}

type DeploymentGroupProps

type DeploymentGroupProps struct {
	Service          ecs.IBaseService
	DeploymentConfig *codedeploy.EcsBlueGreenDeploymentConfig
}

type EcrRepositoryProps

type EcrRepositoryProps struct {
	RemovalPolicy awscdk.RemovalPolicy
}

type EcsClusterProps

type EcsClusterProps struct {
	Vpc                            ec2.Vpc
	EnableFargateCapacityProviders bool
}

type FargateServiceProps

type FargateServiceProps struct {
	ServiceName          string
	DesiredCount         int
	Port                 int
	TaskDefinition       ecs.FargateTaskDefinition
	Vpc                  ec2.Vpc
	Cluster              ecs.ICluster
	DeploymentController *ecs.DeploymentController
}

type FargateTaskDefinitionProps

type FargateTaskDefinitionProps struct {
	ImageRepo       ecr.IRepository
	ImageTag        string
	ContainerName   string
	Port            int
	LogDriver       ecs.LogDriver
	Cpu             int
	PidMode         ecs.PidMode
	RuntimePlatform *ecs.RuntimePlatform
}

type LambdaProps

type LambdaProps struct {
	Architecture lambda.Architecture
	Code         lambda.Code
	Handler      string
	Runtime      lambda.Runtime
	Environment  *map[string]*string
	Policy       *[]iam.PolicyStatement
}

type LambdaTriggerProps

type LambdaTriggerProps struct {
	LambdaFunc   lambda.Function
	UseLatestSdk bool
}

type LogDriverProps

type LogDriverProps struct {
	StreamPrefix string
	Mode         ecs.AwsLogDriverMode
}

type PipelineNestedStackProps

type PipelineNestedStackProps struct {
	awscdk.NestedStackProps
	PipelineName   string
	AppName        string
	FargateService ecs.FargateService
	TaskDefinition ecs.FargateTaskDefinition
	Repository     ecr.Repository
	Vpc            ec2.Vpc
	LoadBalancer   elb.ApplicationLoadBalancer
	Listener       elb.ApplicationListener
	TargetGroupB   elb.ApplicationTargetGroup
	TargetGroupG   elb.ApplicationTargetGroup
}

type ProjectProps

type ProjectProps struct {
	BuildSpec   codebuild.BuildSpec
	Source      codebuild.ISource
	CodeRepo    codecommit.IRepository
	ImageRepo   ecr.IRepository
	TaskDef     ecs.FargateTaskDefinition
	BuildEnv    *codebuild.BuildEnvironment
	Environment *map[string]*codebuild.BuildEnvironmentVariable
}

type RepositoryProps

type RepositoryProps struct {
	Name     string
	FilePath string
	Branch   string
}

type SecurityGroupProps

type SecurityGroupProps struct {
	Vpc           ec2.Vpc
	Port          int
	AllowOutbound bool
	RemoteRule    bool
	Description   string
}

type TargetGroupProps

type TargetGroupProps struct {
	Name       string
	TargetType elb.TargetType
	Vpc        ec2.Vpc
	Port       int
}

type VpcProps

type VpcProps struct {
	IpAddresses string
}

Jump to

Keyboard shortcuts

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