cfn

package
v0.0.0-...-70b3388 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OutputsBucketName             = "bucketName"
	OutputsCIRoleARN              = "ciRoleArn"
	OutputsClusterName            = "clusterName"
	OutputsDefaultSecurityGroupID = "defaultSecurityGroupId"
	OutputsLogGroupARN            = "logGroupArn"
	OutputsSecurityGroupID        = "securityGroupId"
	OutputsSubnetID               = "subnetId"
	OutputsTaskDefArn             = "taskDefArn"
	OutputsTemplateVersion        = "templateVersion"
)
View Source
const (
	ParamsCIRoleName              = "CIRoleName"
	ParamsDockerHubAccessToken    = "DockerHubAccessToken"
	ParamsDockerHubUsername       = "DockerHubUsername"
	ParamsEnablePullThroughCache  = "EnablePullThroughCache"
	ParamsExistingVpcId           = "ExistingVpcId"
	ParamsOidcProviderAudiences   = "OidcProviderAudiences"
	ParamsOidcProviderClaims      = "OidcProviderClaims"
	ParamsOidcProviderIssuer      = "OidcProviderIssuer"
	ParamsOidcProviderSubjects    = "OidcProviderSubjects"
	ParamsOidcProviderThumbprints = "OidcProviderThumbprints"
	ParamsRetainBucket            = "RetainBucket"
)
View Source
const (
	TagKeyCreatedBy   = "defang:CreatedBy"
	TagKeyManagedBy   = "defang:ManagedBy"
	TagKeyPrefix      = "defang:Prefix"
	TagKeyStackName   = "defang:CloudFormationStackName"
	TagKeyStackRegion = "defang:CloudFormationStackRegion"
)
View Source
const TemplateRevision = 2 // bump this when the template changes!

Variables

This section is empty.

Functions

func CreateTemplate

func CreateTemplate(stack string, containers []clouds.Container) (*cloudformation.Template, error)

CreateStaticTemplate creates a parameterized CloudFormation template that can be statically served All conditional logic is moved to CloudFormation parameters and conditions. This allows the template to be generated once and reused across different deployments by providing different parameter values during stack creation/update.

Parameters supported: - ExistingVpcId: VPC ID string or empty to create new VPC - RetainBucket: "true"/"false" - Whether to retain S3 bucket on stack deletion - EnablePullThroughCache: "true"/"false" - Whether to enable ECR pull-through cache - DockerHubUsername: Username for Docker Hub authentication (optional) - DockerHubAccessToken: Access token for Docker Hub authentication (optional) - OidcProviderIssuer: OIDC provider trusted issuer (optional) - OidcProviderSubjects: Comma-delimited list of OIDC provider trusted subject patterns (optional) - OidcProviderThumbprints: Comma-delimited list of OIDC provider thumbprints (optional)

func FetchThumbprints

func FetchThumbprints(iss string) ([]string, error)

func MakeQuickCreateURL

func MakeQuickCreateURL(templateURL string, args QuickCreateArgs) (string, error)

func OptionVPCAndSubnetID

func OptionVPCAndSubnetID(ctx context.Context, vpcID, subnetID string) func(clouds.Driver) error

Types

type AwsEcsCfn

type AwsEcsCfn struct {
	awsecs.AwsEcs
	// contains filtered or unexported fields
}

func New

func New(stack string, region region.Region) *AwsEcsCfn

func (*AwsEcsCfn) FillOutputs

func (a *AwsEcsCfn) FillOutputs(ctx context.Context) error

func (*AwsEcsCfn) GetInfo

func (a *AwsEcsCfn) GetInfo(ctx context.Context, taskArn awsecs.TaskArn) (*clouds.TaskInfo, error)

func (*AwsEcsCfn) Run

func (a *AwsEcsCfn) Run(ctx context.Context, env map[string]string, cmd ...string) (awsecs.TaskArn, error)

func (*AwsEcsCfn) SetUp

func (a *AwsEcsCfn) SetUp(ctx context.Context, containers []clouds.Container) error

func (*AwsEcsCfn) Stop

func (a *AwsEcsCfn) Stop(ctx context.Context, taskArn awsecs.TaskArn) error

func (*AwsEcsCfn) Tail

func (a *AwsEcsCfn) Tail(ctx context.Context, taskArn awsecs.TaskArn) error

func (*AwsEcsCfn) TearDown

func (a *AwsEcsCfn) TearDown(ctx context.Context) error

type ErrStackNotFoundException

type ErrStackNotFoundException = cfnTypes.StackNotFoundException

type Jwk

type Jwk struct {
	Kty string   `json:"kty"`
	Alg string   `json:"alg,omitempty"`
	Use string   `json:"use,omitempty"`
	X5c []string `json:"x5c,omitempty"`
	X5t string   `json:"x5t,omitempty"` // base64url-encoded
}

type JwkSet

type JwkSet struct {
	Keys []Jwk `json:"keys"`
}

type OIDCProvider

type OIDCProvider struct {

	// ClientIdList AWS CloudFormation Property
	// Required: false
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-oidcprovider.html#cfn-iam-oidcprovider-clientidlist
	ClientIdList interface{} `json:"ClientIdList,omitempty"`

	// Tags AWS CloudFormation Property
	// Required: false
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-oidcprovider.html#cfn-iam-oidcprovider-tags
	Tags []tags.Tag `json:"Tags,omitempty"`

	// ThumbprintList AWS CloudFormation Property
	// Required: false
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-oidcprovider.html#cfn-iam-oidcprovider-thumbprintlist
	ThumbprintList interface{} `json:"ThumbprintList,omitempty"` // added "omitempty" to fix marshalling bug

	// Url AWS CloudFormation Property
	// Required: false
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-oidcprovider.html#cfn-iam-oidcprovider-url
	Url *string `json:"Url,omitempty"`

	// AWSCloudFormationDeletionPolicy represents a CloudFormation DeletionPolicy
	AWSCloudFormationDeletionPolicy policies.DeletionPolicy `json:"-"`

	// AWSCloudFormationUpdateReplacePolicy represents a CloudFormation UpdateReplacePolicy
	AWSCloudFormationUpdateReplacePolicy policies.UpdateReplacePolicy `json:"-"`

	// AWSCloudFormationDependsOn stores the logical ID of the resources to be created before this resource
	AWSCloudFormationDependsOn []string `json:"-"`

	// AWSCloudFormationMetadata stores structured data associated with this resource
	AWSCloudFormationMetadata map[string]interface{} `json:"-"`

	// AWSCloudFormationCondition stores the logical ID of the condition that must be satisfied for this resource to be created
	AWSCloudFormationCondition string `json:"-"`
}

OIDCProvider AWS CloudFormation Resource (AWS::IAM::OIDCProvider) See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-oidcprovider.html

func (*OIDCProvider) AWSCloudFormationType

func (r *OIDCProvider) AWSCloudFormationType() string

AWSCloudFormationType returns the AWS CloudFormation resource type

func (OIDCProvider) MarshalJSON

func (r OIDCProvider) MarshalJSON() ([]byte, error)

MarshalJSON is a custom JSON marshalling hook that embeds this object into an AWS CloudFormation JSON resource's 'Properties' field and adds a 'Type'.

func (*OIDCProvider) UnmarshalJSON

func (r *OIDCProvider) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom JSON unmarshalling hook that strips the outer AWS CloudFormation resource object, and just keeps the 'Properties' field.

type OpenIdConfiguration

type OpenIdConfiguration struct {
	JwksUri string `json:"jwks_uri"`
}

type QuickCreateArgs

type QuickCreateArgs struct {
	Region    string
	StackName string
	Params    map[string]string
}

Jump to

Keyboard shortcuts

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