aws

package module
v0.0.0-...-433c97f Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: MIT Imports: 12 Imported by: 2

Documentation

Overview

Package aws is the config tier of sc-plugin-aws. It owns every `aws` + `aws-*` + `s3-*` + `ecr-*` + `ecs-fargate` + `aws-lambda` + `aws-static-website` discriminator SC core parses out of a server.yaml, so that SC core can register the config decoders + template converters without pulling in pulumi-aws / pulumi-awsx.

Extracted from pkg/clouds/aws in api as part of Phase 3+ per forge/docs/design/2026-10-24/sc-plugin-architecture/ 07-plugin-first-for-new-clouds.md §8.

Index

Constants

View Source
const (
	AuthTypeAWSToken             = "aws-token"
	SecretsTypeAWSSecretsManager = "aws-secrets-manager"

	SecretsProviderTypeAwsKms = "aws-kms"
	StateStorageTypeS3Bucket  = "s3-bucket"
)
View Source
const (
	LambdaRoutingApiGw             = "api-gateway"
	LambdaRoutingFunctionUrl       = "function-url"
	LambdaInvokeModeBuffered       = "BUFFERED"
	LambdaInvokeModeResponseStream = "RESPONSE_STREAM"

	LoadBalancerTypeAlb LoadBalancerType = "alb"
	LoadBalancerTypeNlb LoadBalancerType = "nlb"
)
View Source
const (
	DefaultMinHealthyPercent = 100
	DefaultMaxPercent        = 200
)

Default ECS rolling-update percentages, applied when neither the converted Scale.Update nor cloudExtras.rollingUpdate sets a value.

View Source
const ProviderType = "aws"

ProviderType is the top-level discriminator every AWS config reports from ProviderType(). Lives here (not init.go) so a build that pulled in just this one package still compiles.

View Source
const ResourceTypeCloudTrailSecurityAlerts = "aws-cloudtrail-security-alerts"
View Source
const ResourceTypeEcrRepository = "ecr-repository"
View Source
const (
	ResourceTypeRdsMysql = "aws-rds-mysql"
)
View Source
const (
	ResourceTypeRdsPostgres = "aws-rds-postgres"
)
View Source
const ResourceTypeS3Bucket = "s3-bucket"
View Source
const ResourceTypeSesConfigurationSet = "aws-ses-configuration-set"
View Source
const ResourceTypeSesSmtpUser = "aws-ses-smtp-user"
View Source
const SesConfigurationSetNameMaxLen = 64

SesConfigurationSetNameMaxLen is SES's limit on a configuration set name.

View Source
const SesSmtpUserDefaultPort = 587

SesSmtpUserDefaultPort is the SES SMTP STARTTLS port handed to consumers.

View Source
const (
	TemplateTypeAwsLambda = "aws-lambda"
)
View Source
const (
	TemplateTypeEcsFargate = "ecs-fargate"
)
View Source
const TemplateTypeStaticWebsite = "aws-static-website"

Variables

View Source
var DefaultEcrLifecyclePolicy = EcrLifecyclePolicy{
	Rules: []EcrLifecycleRule{
		{
			RulePriority: 1,
			Description:  "Keep only 3 last images",
			Selection: EcrLifecyclePolicySelection{
				TagStatus:   "any",
				CountType:   "imageCountMoreThan",
				CountNumber: 3,
			},
			Action: EcrLifecyclePolicyAction{
				Type: "expire",
			},
		},
	},
}

DefaultEcrLifecyclePolicy is the default ECR lifecycle policy (keep only 3 last images)

View Source
var SesConfigurationSetDefaultEvents = []string{"BOUNCE", "COMPLAINT"}

SesConfigurationSetDefaultEvents are the SES event types published when `events` is omitted: the ones a sender must act on to keep its reputation.

View Source
var SesEventTypes = []string{
	"SEND", "REJECT", "BOUNCE", "COMPLAINT", "DELIVERY", "OPEN", "CLICK",
	"RENDERING_FAILURE", "DELIVERY_DELAY", "SUBSCRIPTION",
}

SesEventTypes are the SES v2 event types an event destination can match, per https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_EventDestination.html

View Source
var SesSmtpRegions = []string{
	"us-east-1", "us-east-2", "us-west-1", "us-west-2",
	"ap-northeast-1", "ap-northeast-2", "ap-northeast-3",
	"ap-south-1", "ap-southeast-1", "ap-southeast-2",
	"ca-central-1",
	"eu-central-1", "eu-north-1", "eu-west-1", "eu-west-2", "eu-west-3",
	"sa-east-1",
	"us-gov-east-1", "us-gov-west-1",
}

SesSmtpRegions are the regions with an SES SMTP endpoint (email-smtp.<region>.amazonaws.com), per https://docs.aws.amazon.com/general/latest/gr/ses.html#ses_smtp_endpoints as of 2026-11. SES regions missing here (af-south-1, ap-south-2, ap-southeast-3, ap-southeast-5, ca-west-1, eu-central-2, eu-south-1, il-central-1, me-central-1, me-south-1, ...) have no SMTP endpoint.

Functions

func EcrRepositoryReadConfig

func EcrRepositoryReadConfig(config *api.Config) (api.Config, error)

func ReadAuthServiceAccountConfig

func ReadAuthServiceAccountConfig(config *api.Config) (api.Config, error)

func ReadCloudTrailSecurityAlertsConfig

func ReadCloudTrailSecurityAlertsConfig(config *api.Config) (api.Config, error)

func ReadRdsMysqlConfig

func ReadRdsMysqlConfig(config *api.Config) (api.Config, error)

func ReadRdsPostgresConfig

func ReadRdsPostgresConfig(config *api.Config) (api.Config, error)

func ReadSecretsConfig

func ReadSecretsConfig(config *api.Config) (api.Config, error)

func ReadSecretsProviderConfig

func ReadSecretsProviderConfig(config *api.Config) (api.Config, error)

func ReadSesConfigurationSetConfig

func ReadSesConfigurationSetConfig(config *api.Config) (api.Config, error)

func ReadSesSmtpUserConfig

func ReadSesSmtpUserConfig(config *api.Config) (api.Config, error)

func ReadStateStorageConfig

func ReadStateStorageConfig(config *api.Config) (api.Config, error)

func ReadTemplateConfig

func ReadTemplateConfig(config *api.Config) (api.Config, error)

func S3BucketReadConfig

func S3BucketReadConfig(config *api.Config) (api.Config, error)

func ToAwsLambdaConfig

func ToAwsLambdaConfig(tpl any, stackCfg *api.StackConfigSingleImage) (any, error)

func ToEcsFargateConfig

func ToEcsFargateConfig(tpl any, composeCfg compose.Config, stackCfg *api.StackConfigCompose) (any, error)

func ToStaticSiteConfig

func ToStaticSiteConfig(tpl any, stackDir, stackName string, stackCfg *api.StackConfigStatic) (any, error)

func ValidateSesConfigurationSetName

func ValidateSesConfigurationSetName(baseName, sesName string) error

ValidateSesConfigurationSetName checks the base name (resource name or `name`) and the resulting SES configuration set name. The base name uses the same alphabet as aws-ses-smtp-user, so the SES_<NAME>_* env vars of two resources can never collide; the full name must fit SES's 64 characters.

func ValidateSesConfigurationSetRegion

func ValidateSesConfigurationSetRegion(region string) error

ValidateSesConfigurationSetRegion applies the aws-ses-smtp-user region allowlist to aws-ses-configuration-set, so a configuration set can always be used by an SMTP user in the same region.

func ValidateSesSmtpRegion

func ValidateSesSmtpRegion(region string) error

ValidateSesSmtpRegion fails for a region without an SES SMTP endpoint.

func ValidateSesSmtpUserName

func ValidateSesSmtpUserName(name string) error

ValidateSesSmtpUserName requires lowercase letters, digits and hyphens in the resource name (or its `name` override). Consumers get the credentials as SMTP_<NAME>_* env vars, and SC upper-cases names and maps `-`/`_` (and camelCase) onto `_`; with this alphabet that mapping is one-to-one, so two resources a client uses can never share env var names (SC keeps the first value of a duplicate name and silently drops the rest).

Types

type AccountConfig

type AccountConfig struct {
	Account         string `json:"account" yaml:"account"`
	AccessKey       string `json:"accessKey" yaml:"accessKey"`
	SecretAccessKey string `json:"secretAccessKey" yaml:"secretAccessKey"`
	Region          string `json:"region" yaml:"region"`
	// PermissionsBoundary, when set to an IAM policy ARN, is applied as the
	// permissions boundary on every IAM role SC creates for workloads under this
	// account: ECS task/execution roles, Lambda and alert-Lambda execution roles,
	// and DB-init (pg-init/mysql-init) exec-task roles. Optional and empty by
	// default, so it changes nothing unless a parent stack opts in per template.
	// Lets an operator cap what a deployed workload role can ever do, independent
	// of the role's own policy (effective perms become policy AND boundary).
	// WARNING: one ARN caps ALL workload roles in the stack at once — a boundary
	// too tight silently strips e.g. ECR pull / logs / SecretsManager from every
	// service on the next deploy, so validate it in staging first.
	PermissionsBoundary string `json:"permissionsBoundary,omitempty" yaml:"permissionsBoundary,omitempty"`
	api.Credentials     `json:",inline" yaml:",inline"`
}

func (*AccountConfig) CredentialsValue

func (r *AccountConfig) CredentialsValue() string

func (*AccountConfig) KeepBoundary

func (r *AccountConfig) KeepBoundary(templateBoundary string)

KeepBoundary preserves a non-credential permissions-boundary value across an api.ConvertAuth call, which rehydrates an AccountConfig from the resolved ${auth:...} credentials blob and so carries only credential fields. Callers pass the boundary declared at template level; a non-empty template value wins (the documented precedence), while an empty one leaves whatever ConvertAuth loaded (an auth-level boundary). Centralizes the precedence so every ConvertAuth site that feeds a workload role behaves identically.

func (*AccountConfig) ProjectIdValue

func (r *AccountConfig) ProjectIdValue() string

func (*AccountConfig) ProviderType

func (r *AccountConfig) ProviderType() string

type CloudExtras

type CloudExtras struct {
	// ContainerSecrets restricts ECS secret injection by compose service name.
	// A missing service inherits all stack/context secrets; an empty list gets none.
	ContainerSecrets map[string][]string `json:"containerSecrets,omitempty" yaml:"containerSecrets,omitempty"`

	// All hardening flags default to false to preserve existing stacks.
	LeastPrivilegeRoles             bool `json:"leastPrivilegeRoles,omitempty" yaml:"leastPrivilegeRoles,omitempty"`
	RestrictTaskIngress             bool `json:"restrictTaskIngress,omitempty" yaml:"restrictTaskIngress,omitempty"`
	NlbSecurityGroups               bool `json:"nlbSecurityGroups,omitempty" yaml:"nlbSecurityGroups,omitempty"`
	EnableHTTPS                     bool `json:"enableHTTPS,omitempty" yaml:"enableHTTPS,omitempty"`
	DisablePublicIPWithStaticEgress bool `json:"disablePublicIPWithStaticEgress,omitempty" yaml:"disablePublicIPWithStaticEgress,omitempty"`

	AwsRoles          []string          `json:"awsRoles" yaml:"awsRoles"`
	LambdaSchedule    *LambdaSchedule   `json:"lambdaSchedule,omitempty" yaml:"lambdaSchedule,omitempty"`   // e.g. for lambda functions to be triggered on schedule
	LambdaSchedules   []LambdaSchedule  `json:"lambdaSchedules,omitempty" yaml:"lambdaSchedules,omitempty"` // e.g. for lambda functions to be triggered on schedule
	LambdaRoutingType LambdaRoutingType `json:"lambdaRoutingType" yaml:"lambdaRoutingType"`
	LambdaInvokeMode  LambdaInvokeMode  `json:"lambdaInvokeMode" yaml:"lambdaInvokeMode"` // invoke mode for lambda

	SecurityGroup    *SecurityGroup   `json:"securityGroup,omitempty" yaml:"securityGroup,omitempty"`
	LoadBalancerType LoadBalancerType `json:"loadBalancerType,omitempty" yaml:"loadBalancerType,omitempty"` // default: alb

	// SecretsBundle — opt-in secrets consolidation (design 2026-10-17,
	// `forge/docs/design/2026-10-17/sc-secrets-bundle-mode/`). When
	// non-nil, SC renders ONE AWS Secrets Manager secret per service
	// with a JSON payload of `{envName:string → value:string}` plus ONE
	// env var `FORGE_SECRETS_BUNDLE_ARN` pointing at it, instead of N
	// per-key secrets each occupying a Lambda env slot. nil = legacy
	// per-key byte-for-byte. See `SecretsBundleConfig` for the fields;
	// `secretsBundle: {}` in YAML is the minimal opt-in (defaults
	// enabled). Mirrors the pointer-struct pattern k8s.VPA uses.
	SecretsBundle *SecretsBundleConfig `json:"secretsBundle,omitempty" yaml:"secretsBundle,omitempty"`

	// RollingUpdate overrides the ECS service deploymentConfiguration of an
	// ecs-fargate cloud-compose stack. nil (or an unset field) keeps the
	// defaults minimumHealthyPercent 100 / maximumPercent 200. See
	// EcsRollingUpdate.
	RollingUpdate *EcsRollingUpdate `json:"rollingUpdate,omitempty" yaml:"rollingUpdate,omitempty"`
}

type CloudTrailAlertOverride

type CloudTrailAlertOverride struct {
	// Threshold raises the alarm threshold (events per period). 0 = use the plugin default
	// for this detector (1 for most, 5 for unauthorizedApiCalls, 10 for anonymousProbes).
	Threshold float64 `json:"threshold,omitempty" yaml:"threshold,omitempty"`
	// Period in seconds. 0 = 300 (5 min). CloudWatch supports 60, 300, 3600.
	Period int `json:"period,omitempty" yaml:"period,omitempty"`
	// EvaluationPeriods is how many consecutive periods must breach. 0 = 1.
	EvaluationPeriods int `json:"evaluationPeriods,omitempty" yaml:"evaluationPeriods,omitempty"`

	// ExcludeUserNames excludes events where $.userIdentity.userName matches the given
	// names exactly. Useful for IAMUser-type principals like CI bot accounts.
	ExcludeUserNames []string `json:"excludeUserNames,omitempty" yaml:"excludeUserNames,omitempty"`
	// ExcludePrincipalIds excludes by $.userIdentity.principalId (AIDA..., AROA..., AKIA...).
	ExcludePrincipalIds []string `json:"excludePrincipalIds,omitempty" yaml:"excludePrincipalIds,omitempty"`
	// ExcludeUserArns excludes by exact $.userIdentity.arn match.
	ExcludeUserArns []string `json:"excludeUserArns,omitempty" yaml:"excludeUserArns,omitempty"`
	// ExcludeUserArnGlobs excludes by $.userIdentity.arn glob (CloudWatch metric filter
	// patterns support * within string values, e.g.
	// "arn:aws:sts::*:assumed-role/AWSServiceRoleFor*/*"). One glob per list entry.
	ExcludeUserArnGlobs []string `json:"excludeUserArnGlobs,omitempty" yaml:"excludeUserArnGlobs,omitempty"`
	// ExcludeUserTypes excludes by $.userIdentity.type (e.g. "AWSService", "AWSAccount",
	// "AssumedRole"). Useful for stripping AWS internal plumbing from unauthorized-api-calls.
	ExcludeUserTypes []string `json:"excludeUserTypes,omitempty" yaml:"excludeUserTypes,omitempty"`
	// ExcludeInvokedBy excludes by $.userIdentity.invokedBy (e.g. "s3.amazonaws.com").
	// This is the canonical way to strip AWS service self-probes.
	ExcludeInvokedBy []string `json:"excludeInvokedBy,omitempty" yaml:"excludeInvokedBy,omitempty"`
}

CloudTrailAlertOverride tunes a single detector. All fields are optional; zero values mean "use plugin default."

type CloudTrailAlertSelectors

type CloudTrailAlertSelectors struct {
	// CIS CloudWatch.1-14
	RootAccountUsage       bool `json:"rootAccountUsage,omitempty" yaml:"rootAccountUsage,omitempty"`             // CIS CloudWatch.1
	UnauthorizedApiCalls   bool `json:"unauthorizedApiCalls,omitempty" yaml:"unauthorizedApiCalls,omitempty"`     // CIS CloudWatch.2
	ConsoleLoginWithoutMfa bool `json:"consoleLoginWithoutMfa,omitempty" yaml:"consoleLoginWithoutMfa,omitempty"` // CIS CloudWatch.3
	IamPolicyChanges       bool `json:"iamPolicyChanges,omitempty" yaml:"iamPolicyChanges,omitempty"`             // CIS CloudWatch.4
	CloudTrailTampering    bool `json:"cloudTrailTampering,omitempty" yaml:"cloudTrailTampering,omitempty"`       // CIS CloudWatch.5
	FailedConsoleLogins    bool `json:"failedConsoleLogins,omitempty" yaml:"failedConsoleLogins,omitempty"`       // CIS CloudWatch.6
	KmsKeyDeletion         bool `json:"kmsKeyDeletion,omitempty" yaml:"kmsKeyDeletion,omitempty"`                 // CIS CloudWatch.7
	S3BucketPolicyChanges  bool `json:"s3BucketPolicyChanges,omitempty" yaml:"s3BucketPolicyChanges,omitempty"`   // CIS CloudWatch.8
	ConfigChanges          bool `json:"configChanges,omitempty" yaml:"configChanges,omitempty"`                   // CIS CloudWatch.9
	SecurityGroupChanges   bool `json:"securityGroupChanges,omitempty" yaml:"securityGroupChanges,omitempty"`     // CIS CloudWatch.10
	NaclChanges            bool `json:"naclChanges,omitempty" yaml:"naclChanges,omitempty"`                       // CIS CloudWatch.11
	NetworkGatewayChanges  bool `json:"networkGatewayChanges,omitempty" yaml:"networkGatewayChanges,omitempty"`   // CIS CloudWatch.12
	RouteTableChanges      bool `json:"routeTableChanges,omitempty" yaml:"routeTableChanges,omitempty"`           // CIS CloudWatch.13
	VpcChanges             bool `json:"vpcChanges,omitempty" yaml:"vpcChanges,omitempty"`                         // CIS CloudWatch.14

	// Beyond-CIS detectors. Default off so existing deployments don't gain new alerts on plugin upgrade.
	GuardDutyDisabled     bool `json:"guardDutyDisabled,omitempty" yaml:"guardDutyDisabled,omitempty"`         // GuardDuty disabled/detector deleted
	SecurityHubDisabled   bool `json:"securityHubDisabled,omitempty" yaml:"securityHubDisabled,omitempty"`     // Security Hub disabled or standards turned off
	AccessKeyCreation     bool `json:"accessKeyCreation,omitempty" yaml:"accessKeyCreation,omitempty"`         // CreateAccessKey on any IAM user
	S3PublicAccessChanges bool `json:"s3PublicAccessChanges,omitempty" yaml:"s3PublicAccessChanges,omitempty"` // Block Public Access toggled at account or bucket scope
	LambdaUrlPublic       bool `json:"lambdaUrlPublic,omitempty" yaml:"lambdaUrlPublic,omitempty"`             // Lambda Function URL created/updated with AuthType=NONE
	// KMS-related detectors are split into two by signal density:
	//   KmsKeyPolicy  — PutKeyPolicy: rare, real signal, default threshold 1. The structural
	//                   change to "who can use this key" — page on any occurrence.
	//   KmsKeyGrants  — CreateGrant / RetireGrant / RevokeGrant: high-volume in any IaC-driven
	//                   environment (Pulumi/Terraform issue a grant per encrypted resource).
	//                   Default off; turn on only with the override.threshold tuned to your
	//                   deploy cadence. Splitting was driven by production data showing
	//                   ~25 CreateGrant/hour from one Pulumi bot account that would have
	//                   buried a single PutKeyPolicy signal.
	KmsKeyPolicy         bool `json:"kmsKeyPolicy,omitempty" yaml:"kmsKeyPolicy,omitempty"`                 // PutKeyPolicy (rare; default threshold 1)
	KmsKeyGrants         bool `json:"kmsKeyGrants,omitempty" yaml:"kmsKeyGrants,omitempty"`                 // CreateGrant / RetireGrant / RevokeGrant (high-volume; default threshold 10)
	OrganizationsChanges bool `json:"organizationsChanges,omitempty" yaml:"organizationsChanges,omitempty"` // SCP / account-membership churn in AWS Organizations
	AnonymousProbes      bool `json:"anonymousProbes,omitempty" yaml:"anonymousProbes,omitempty"`           // userIdentity.type=AWSAccount AccessDenied probes from public IPs

	// Overrides allows per-detector tuning without forking the plugin. Keyed by detector
	// selector name (e.g. "iamPolicyChanges"). An override can:
	//   - bake exclusion clauses into the CloudWatch metric filter pattern (preferred
	//     for governed automation that contributes nothing but noise — Pulumi CI bots,
	//     known scanners, AWS service-linked roles);
	//   - raise the alarm threshold so a single matched event no longer trips the alarm
	//     (CIS Benchmark guidance for unauthorized-api-calls);
	//   - adjust the evaluation window.
	//
	// Suppression happens at the metric-filter layer, not in the Lambda enrichment
	// step — excluded events never increment the metric, the alarm never trips, and
	// no Slack notification is sent. The CW alarm dashboard therefore reflects real
	// signal rather than known-good noise (preserves SOC2/ISO audit clarity).
	Overrides map[string]CloudTrailAlertOverride `json:"overrides,omitempty" yaml:"overrides,omitempty"`
}

CloudTrailAlertSelectors controls which security alerts are enabled. Each field maps to a CloudWatch metric filter + alarm on the CloudTrail log group. Built-in detectors track AWS Security Hub/CIS CloudWatch controls (CloudWatch.1-14) plus a set of high-value additions covering attacker-blinding moves and exposure paths that CIS does not cover (GuardDuty/SecurityHub disable, IAM access keys, S3 Block Public Access, public Lambda Function URLs, KMS key policy edits, AWS Organizations changes, anonymous external probes).

type CloudTrailSecurityAlertsConfig

type CloudTrailSecurityAlertsConfig struct {
	AccountConfig  `json:",inline" yaml:",inline"`
	LogGroupName   string                   `json:"logGroupName" yaml:"logGroupName"`
	LogGroupRegion string                   `json:"logGroupRegion,omitempty" yaml:"logGroupRegion,omitempty"`
	Slack          *api.SlackCfg            `json:"slack,omitempty" yaml:"slack,omitempty"`
	Discord        *api.DiscordCfg          `json:"discord,omitempty" yaml:"discord,omitempty"`
	Telegram       *api.TelegramCfg         `json:"telegram,omitempty" yaml:"telegram,omitempty"`
	Email          *api.EmailCfg            `json:"email,omitempty" yaml:"email,omitempty"`
	Alerts         CloudTrailAlertSelectors `json:"alerts" yaml:"alerts"`
	// Trail pre-flight check (SOC2 CC7.1 / ISO 27001 A.8.15): when TrailName
	// is set, SC inspects the referenced CloudTrail trail at provision time
	// and refuses to deploy unless log-file validation is enabled. This
	// prevents a silent gap where the metric filters + alarms happily match
	// events in a trail whose log files are not tamper-detectable.
	//
	// TrailName is the friendly name of the CloudTrail trail (not the ARN).
	// AWS accepts either, but friendly name is what `aws cloudtrail
	// describe-trails` returns by default and what users actually see in
	// the console.
	//
	// When TrailName is empty the check is skipped (back-compat for
	// deployments that don't want SC touching the trail). Set explicitly to
	// opt into the guardrail.
	TrailName string `json:"trailName,omitempty" yaml:"trailName,omitempty"`
	// When true (default, if TrailName is set) the provisioner FAILS deploy
	// if log-file validation is off. When false, SC only logs a warning
	// and continues — use during incremental rollout, not as a permanent
	// escape hatch.
	RequireLogFileValidation *bool `json:"requireLogFileValidation,omitempty" yaml:"requireLogFileValidation,omitempty"`
}

CloudTrailSecurityAlertsConfig defines CloudWatch metric filters and alarms for security-relevant CloudTrail events (SOC2 CC6.1/CC7.1, ISO 27001 A.8.2/A.8.15/A.8.16).

func (CloudTrailSecurityAlertsConfig) RequiresTrailValidation

func (c CloudTrailSecurityAlertsConfig) RequiresTrailValidation() bool

RequiresTrailValidation reports whether the config has opted into the pre-flight check. True iff TrailName is set AND RequireLogFileValidation is either unset (default true) or explicitly true.

type EcrLifecyclePolicy

type EcrLifecyclePolicy struct {
	Rules []EcrLifecycleRule `json:"rules" yaml:"rules"`
}

type EcrLifecyclePolicyAction

type EcrLifecyclePolicyAction struct {
	Type string `json:"type" yaml:"type"`
}

type EcrLifecyclePolicySelection

type EcrLifecyclePolicySelection struct {
	TagStatus      string   `json:"tagStatus" yaml:"tagStatus"`
	TagPatternList []string `json:"tagPatternList,omitempty" yaml:"tagPatternList,omitempty"`
	TagPrefixList  []string `json:"tagPrefixList,omitempty" yaml:"tagPrefixList,omitempty"`
	CountType      string   `json:"countType" yaml:"countType"`
	CountNumber    int      `json:"countNumber" yaml:"countNumber"`
	CountUnit      string   `json:"countUnit,omitempty" yaml:"countUnit,omitempty"`
}

type EcrLifecycleRule

type EcrLifecycleRule struct {
	RulePriority int                         `json:"rulePriority" yaml:"rulePriority"`
	Description  string                      `json:"description" yaml:"description"`
	Selection    EcrLifecyclePolicySelection `json:"selection" yaml:"selection"`
	Action       EcrLifecyclePolicyAction    `json:"action" yaml:"action"`
}

type EcrRepository

type EcrRepository struct {
	AccountConfig   `json:",inline" yaml:",inline"`
	Name            string              `json:"name,omitempty" yaml:"name,omitempty"`
	LifecyclePolicy *EcrLifecyclePolicy `json:"lifecyclePolicy" yaml:"lifecyclePolicy"`
}

type EcsFargateConfig

type EcsFargateConfig struct {
	// AccountConfig already carries an embedded `api.Credentials`
	// via its own inline embed (see auth.go). Including BOTH here
	// produced two struct fields with the yaml tag "credentials",
	// which yaml.v3's decoder rejects as `duplicated key 'credentials'`
	// — fatal panic in `decodeInputsAs` on the plugin bus the first
	// time an ecs-fargate stack decodes through it (fleet-wide outage
	// 2026-10-30, forge-baas `baas-meeting`/`browse` builds). The
	// in-tree deploy path never stressed this because it didn't
	// yaml-round-trip the struct the same way; the plugin bus does.
	AccountConfig      `json:",inline" yaml:",inline"`
	Cpu                int    `json:"cpu" yaml:"cpu"`
	Memory             int    `json:"memory" yaml:"memory"`
	EphemeralStorageGB int    `json:"ephemeralStorageGB" yaml:"ephemeralStorageGB"`
	Version            string `json:"version" yaml:"version"`
}

func (*EcsFargateConfig) CredentialsValue

func (r *EcsFargateConfig) CredentialsValue() string

func (*EcsFargateConfig) ProjectIdValue

func (r *EcsFargateConfig) ProjectIdValue() string

type EcsFargateContainer

type EcsFargateContainer struct {
	Name          string                 `json:"name" yaml:"name"`
	Image         api.ContainerImage     `json:"image" yaml:"image"`
	Env           map[string]string      `json:"env" yaml:"env"`
	Secrets       map[string]string      `json:"secrets" yaml:"secrets"`
	Port          int                    `json:"port" yaml:"port"`
	LivenessProbe EcsFargateProbe        `json:"livenessProbe" yaml:"livenessProbe"`
	StartupProbe  EcsFargateProbe        `json:"startupProbe" yaml:"startupProbe"`
	MountPoints   []EcsFargateMountPoint `json:"mountPoints" yaml:"mountPoints"`
	Cpu           int                    `json:"cpu" yaml:"cpu"`
	Memory        int                    `json:"memory" yaml:"memory"`
	DependsOn     []EcsFargateDependsOn  `json:"dependsOn" yaml:"dependsOn"`
}

type EcsFargateDependsOn

type EcsFargateDependsOn struct {
	Container string `json:"container" yaml:"container"`
	Condition string `json:"condition" yaml:"condition"`
}

type EcsFargateInput

type EcsFargateInput struct {
	TemplateConfig   `json:"templateConfig" yaml:"templateConfig"`
	Scale            EcsFargateScale                     `json:"scale" yaml:"scale"`
	Containers       []EcsFargateContainer               `json:"containers" yaml:"containers"`
	IngressContainer EcsFargateContainer                 `json:"ingressContainer" yaml:"ingressContainer"`
	Config           EcsFargateConfig                    `json:"config" yaml:"config"`
	Domain           string                              `json:"domain" yaml:"domain"`
	DomainProxied    *bool                               `json:"domainProxied" yaml:"domainProxied"`
	RefResourceNames []string                            `json:"refResourceNames" yaml:"refResourceNames"`
	Secrets          map[string]string                   `json:"secrets" yaml:"secrets"`
	BaseDnsZone      string                              `json:"baseDnsZone" yaml:"baseDnsZone"`
	Dependencies     []api.StackConfigDependencyResource `json:"dependencies" yaml:"dependencies"`
	Volumes          []EcsFargateVolume                  `json:"volumes" yaml:"volumes"`
	Alerts           *api.AlertsConfig                   `json:"alerts" yaml:"alerts"`
	ComposeDir       string                              `json:"composeDir" yaml:"composeDir"`
	CloudExtras      *CloudExtras                        `json:"cloudExtras" yaml:"cloudExtras"`
	StackConfig      *api.StackConfigCompose             `json:"stackConfig" yaml:"stackConfig"`
}

func (*EcsFargateInput) DependsOnResources

func (i *EcsFargateInput) DependsOnResources() []api.StackConfigDependencyResource

func (*EcsFargateInput) DeploymentPercents

func (i *EcsFargateInput) DeploymentPercents() (minHealthyPercent, maxPercent int, err error)

DeploymentPercents resolves the ECS service minimumHealthyPercent and maximumPercent. Without cloudExtras.rollingUpdate the result is exactly the pre-existing behaviour (Scale.Update, 0 meaning the 100/200 default) and no validation is applied. With it, the set fields override and the resolved pair is validated.

func (*EcsFargateInput) OverriddenBaseZone

func (i *EcsFargateInput) OverriddenBaseZone() string

func (*EcsFargateInput) Uses

func (i *EcsFargateInput) Uses() []string

func (*EcsFargateInput) ValidateContainerSecrets

func (i *EcsFargateInput) ValidateContainerSecrets(availableSecrets []string) error

ValidateContainerSecrets checks allowlists against the running containers. A nil availableSecrets defers secret-name validation until compute resource secrets are known by the driver; a non-nil (even empty) list validates both.

type EcsFargateMountPoint

type EcsFargateMountPoint struct {
	ContainerPath string `json:"containerPath" yaml:"containerPath" pulumi:"containerPath"`
	ReadOnly      bool   `json:"readOnly" yaml:"readOnly" pulumi:"readOnly"`
	SourceVolume  string `json:"sourceVolume" yaml:"sourceVolume" pulumi:"sourceVolume"`
}

EcsFargateMountPoint crosses the SC core -> plugin bus (JSON-encoded by core, decoded by the plugin), so it needs explicit json and yaml tags: without them JSON emitted "ContainerPath"/"SourceVolume" while yaml.v3 looked for "containerpath"/"sourcevolume", and every mount point arrived empty.

type EcsFargateProbe

type EcsFargateProbe struct {
	Command             []string     `json:"command" yaml:"command"`
	HttpGet             ProbeHttpGet `json:"httpGet" yaml:"httpGet"`
	InitialDelaySeconds int          `json:"initialDelaySeconds" yaml:"initialDelaySeconds"`
	TimeoutSeconds      int          `json:"timeoutSeconds" yaml:"timeoutSeconds"`
	IntervalSeconds     int          `json:"intervalSeconds" yaml:"intervalSeconds"`
	Retries             int          `json:"retries" yaml:"retries"`
}

func (*EcsFargateProbe) FromHealthCheck

func (p *EcsFargateProbe) FromHealthCheck(svc types.ServiceConfig, port int)

type EcsFargateResources

type EcsFargateResources struct {
	Limits   map[string]string `json:"limits" yaml:"limits"`
	Requests map[string]string `json:"requests" yaml:"requests"`
}

type EcsFargateScale

type EcsFargateScale struct {
	Min int `json:"min" yaml:"min"`
	Max int `json:"max" yaml:"max"`

	Policies []EcsFargateScalePolicy `json:"policy" yaml:"policy"`
	Update   FargateRollingUpdate    `json:"update" yaml:"update"`
}

type EcsFargateScalePolicy

type EcsFargateScalePolicy struct {
	Type             EcsFargateScalePolicyType `json:"type" yaml:"type"`
	TargetValue      int                       `yaml:"targetValue" json:"targetValue"`
	ScaleInCooldown  int                       `json:"scaleInCooldown" yaml:"scaleInCooldown"`
	ScaleOutCooldown int                       `json:"scaleOutCooldown" yaml:"scaleOutCooldown"`
}

type EcsFargateScalePolicyType

type EcsFargateScalePolicyType string
const (
	ScaleCpu    EcsFargateScalePolicyType = "cpu"
	ScaleMemory EcsFargateScalePolicyType = "memory"
)

type EcsFargateVolume

type EcsFargateVolume struct {
	Name string `json:"name" yaml:"name"`
}

type EcsRollingUpdate

type EcsRollingUpdate struct {
	MinHealthyPercent *int `json:"minHealthyPercent,omitempty" yaml:"minHealthyPercent,omitempty"`
	MaxPercent        *int `json:"maxPercent,omitempty" yaml:"maxPercent,omitempty"`
}

EcsRollingUpdate is the opt-in `cloudExtras.rollingUpdate` block. Pointer fields keep "unset" distinct from an explicit 0, so `minHealthyPercent: 0` is honoured while an omitted field keeps its default.

`minHealthyPercent: 0` + `maxPercent: 100` makes ECS stop the old task before starting the new one: needed by a single-task service that holds an exclusive lock on shared storage (e.g. a database datadir on EFS).

type FargateRollingUpdate

type FargateRollingUpdate struct {
	MinHealthyPercent int `json:"minHealthyPercent" yaml:"minHealthyPercent"`
	MaxPercent        int `json:"maxPercent" yaml:"maxPercent"`
}

type LambdaInput

type LambdaInput struct {
	AccountConfig `json:",inline" yaml:",inline"`
	StackConfig   api.StackConfigSingleImage `json:"stackConfig" yaml:"stackConfig"`
}

func (*LambdaInput) DependsOnResources

func (l *LambdaInput) DependsOnResources() []api.StackConfigDependencyResource

func (*LambdaInput) OverriddenBaseZone

func (l *LambdaInput) OverriddenBaseZone() string

func (*LambdaInput) Uses

func (l *LambdaInput) Uses() []string

type LambdaInvokeMode

type LambdaInvokeMode string

type LambdaRoutingType

type LambdaRoutingType string

type LambdaSchedule

type LambdaSchedule struct {
	Name       string `json:"name,omitempty" yaml:"name,omitempty"`
	Expression string `json:"expression" yaml:"expression"`
	Request    string `json:"request" yaml:"request"`
}

type LoadBalancerType

type LoadBalancerType string

type MysqlConfig

type MysqlConfig struct {
	AccountConfig   `json:",inline" yaml:",inline"`
	Name            string  `json:"name" yaml:"name"`
	InstanceClass   string  `json:"instanceClass" yaml:"instanceClass"`
	AllocateStorage *int    `json:"allocateStorage" yaml:"allocateStorage"`
	EngineVersion   string  `json:"engineVersion" yaml:"engineVersion"`
	Username        string  `json:"username" yaml:"username"`
	Password        string  `json:"password" yaml:"password"`
	DatabaseName    *string `json:"databaseName" yaml:"databaseName"`
	EngineName      *string `json:"engineName,omitempty" yaml:"engineName,omitempty"`
	// StorageEncrypted controls AWS-side encryption-at-rest for the
	// underlying EBS volume. When unset (nil), new instances default
	// to ENCRYPTED (AWS-managed `aws/rds` KMS key), matching CIS-AWS
	// Foundations RDS.3. Set `false` explicitly to opt out for legacy
	// unencrypted stacks; set `true` to be explicit.
	//
	// AWS RDS `storage_encrypted` is IMMUTABLE post-creation. The
	// default flip is safe for existing instances because the
	// `pulumi.IgnoreChanges` on the resource opts (see
	// plugin/internal/rds_mysql.go) silences storage_encrypted
	// drift — Pulumi will not propose a destructive replacement when
	// the spec value differs from the cloud-actual value. Customers
	// who want to genuinely migrate an existing unencrypted RDS to
	// encrypted must do it out-of-band: snapshot → encrypted-copy →
	// restore → re-import.
	StorageEncrypted *bool `json:"storageEncrypted,omitempty" yaml:"storageEncrypted,omitempty"`
}

type PostgresConfig

type PostgresConfig struct {
	AccountConfig   `json:",inline" yaml:",inline"`
	Name            string  `json:"name" yaml:"name"`
	InstanceClass   string  `json:"instanceClass" yaml:"instanceClass"`
	AllocateStorage *int    `json:"allocateStorage" yaml:"allocateStorage"`
	EngineVersion   string  `json:"engineVersion" yaml:"engineVersion"`
	Username        string  `json:"username" yaml:"username"`
	Password        string  `json:"password" yaml:"password"`
	DatabaseName    *string `json:"databaseName" yaml:"databaseName"`
	InitSQL         *string `json:"initSQL,omitempty" yaml:"initSQL,omitempty"`
	// StorageEncrypted controls AWS-side encryption-at-rest for the
	// underlying EBS volume. When unset (nil), new instances default
	// to ENCRYPTED (AWS-managed `aws/rds` KMS key), matching CIS-AWS
	// Foundations RDS.3. Set `false` explicitly to opt out for legacy
	// unencrypted stacks; set `true` to be explicit.
	//
	// AWS RDS `storage_encrypted` is IMMUTABLE post-creation. The
	// default flip is safe for existing instances because the
	// `pulumi.IgnoreChanges` on the resource opts (see
	// plugin/internal/rds_postgres.go) silences storage_encrypted
	// drift — Pulumi will not propose a destructive replacement when
	// the spec value differs from the cloud-actual value. Customers
	// who want to genuinely migrate an existing unencrypted RDS to
	// encrypted must do it out-of-band: snapshot → encrypted-copy →
	// restore → re-import.
	StorageEncrypted *bool `json:"storageEncrypted,omitempty" yaml:"storageEncrypted,omitempty"`
}

type ProbeHttpGet

type ProbeHttpGet struct {
	Path             string `json:"path" yaml:"path"`
	Port             int    `json:"port" yaml:"port"`
	SuccessCodes     string `json:"successCodes" yaml:"successCodes"`
	HealthyThreshold int    `json:"healthyThreshold" yaml:"healthyThreshold"`
}

type S3Bucket

type S3Bucket struct {
	AccountConfig         `json:",inline" yaml:",inline"`
	*api.StaticSiteConfig `json:",inline,omitempty" yaml:",inline,omitempty"`
	Name                  string `json:"name,omitempty" yaml:"name,omitempty"`
	AllowOnlyHttps        bool   `json:"allowOnlyHttps" yaml:"allowOnlyHttps"`
}

type SecretsBundleConfig

type SecretsBundleConfig struct {
	// Enabled defaults to true when SecretsBundle is non-nil. The
	// explicit `enabled: false` form is accepted so the operator can
	// stage a rollback without removing the whole block (keeps git
	// diffs small). nil pointer = treated as true.
	Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty"`

	// Name — optional secret-name suffix override. Default naming is
	// `<stack>--<env>--secrets-bundle--v1` (sibling of the per-key
	// naming scheme in `plugin/internal/secrets.go:20`).
	// Operators who need a human-readable alias can set this.
	Name string `json:"name,omitempty" yaml:"name,omitempty"`

	// MaxEntries — optional guard against runaway `env:` growth
	// outpacing the 65 KB Secrets Manager payload cap. Zero = no
	// check; Pulumi preflight rejects renders over this count.
	MaxEntries int `json:"maxEntries,omitempty" yaml:"maxEntries,omitempty"`

	// KMSKeyID — optional CMK for encrypting the bundle secret.
	// Default is the AWS-managed `aws/secretsmanager` key.
	KMSKeyID string `json:"kmsKeyId,omitempty" yaml:"kmsKeyId,omitempty"`
}

SecretsBundleConfig configures the opt-in Secrets Manager bundling mode. All fields are optional; the zero value of the struct (any non-nil SecretsBundle with no fields set) enables bundle rendering with sensible defaults.

func (*SecretsBundleConfig) IsEnabled

func (b *SecretsBundleConfig) IsEnabled() bool

IsEnabled reports whether the bundle is on. nil receiver → false (legacy per-key rendering). Non-nil with Enabled unset → true (the minimal `secretsBundle: {}` form opts in). Non-nil with Enabled=false → false (operator-staged rollback escape hatch).

type SecretsConfig

type SecretsConfig struct {
	AccountConfig `json:",inline" yaml:",inline"`
}

type SecretsProviderConfig

type SecretsProviderConfig struct {
	AccountConfig `json:",inline" yaml:",inline"`
	Provision     bool `json:"provision" yaml:"provision"`

	// must be in the format:
	// awskms://1234abcd-12ab-34cd-56ef-1234567890ab?region=us-east-1
	KeyName string `json:"keyName" yaml:"keyName"`
}

func (*SecretsProviderConfig) IsProvisionEnabled

func (sa *SecretsProviderConfig) IsProvisionEnabled() bool

func (*SecretsProviderConfig) KeyUrl

func (sa *SecretsProviderConfig) KeyUrl() string

func (*SecretsProviderConfig) ProviderType

func (sa *SecretsProviderConfig) ProviderType() string

ProviderType — same rationale as StateStorageConfig.ProviderType, but for the Pulumi stack-secrets-provider path keyed by `aws-kms`.

type SecurityGroup

type SecurityGroup struct {
	Ingress *SecurityGroupRule `json:"ingress,omitempty" yaml:"ingress,omitempty"`
}

type SecurityGroupRule

type SecurityGroupRule struct {
	AllowOnlyCloudflare *bool     `json:"allowOnlyCloudflare,omitempty" yaml:"allowOnlyCloudflare,omitempty"`
	CidrBlocks          *[]string `json:"cidrBlocks,omitempty" yaml:"cidrBlocks,omitempty"`
	Ipv6CidrBlocks      *[]string `json:"ipv6CidrBlocks,omitempty" yaml:"ipv6CidrBlocks,omitempty"`
}

type SesConfigurationSet

type SesConfigurationSet struct {
	AccountConfig `json:",inline" yaml:",inline"`
	// Name overrides the base name (defaults to the resource name in
	// server.yaml). The SES configuration set is named `<name>--<env>`.
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// Events are the SES event types published to the SNS topic. Defaults
	// to SesConfigurationSetDefaultEvents.
	Events []string `json:"events,omitempty" yaml:"events,omitempty"`
	// HttpsEndpoints are subscribed to the SNS topic with the `https`
	// protocol. Each endpoint must confirm the subscription itself (SNS
	// POSTs a SubscriptionConfirmation with a SubscribeURL). May be empty.
	HttpsEndpoints []string `json:"httpsEndpoints,omitempty" yaml:"httpsEndpoints,omitempty"`
}

SesConfigurationSet provisions an SES v2 configuration set whose sending events are published to a dedicated SNS topic, optionally fanned out to HTTPS endpoints (e.g. a mailer's bounce/complaint webhook).

The SES configuration set is named `<name>--<env>` (the same env-suffixed name SC gives every resource), where `<name>` is `name` or the resource name. An aws-ses-smtp-user sending through it references that exact name in its `configurationSet`.

`region` (from the embedded AccountConfig) is the SES region; when omitted, the region of the `${auth:...}` credentials is used. It must be a region with an SES SMTP endpoint, like aws-ses-smtp-user's, so the two resources can always be paired.

func (*SesConfigurationSet) EffectiveEvents

func (c *SesConfigurationSet) EffectiveEvents() []string

EffectiveEvents returns the configured events, or the defaults.

func (*SesConfigurationSet) Validate

func (c *SesConfigurationSet) Validate() error

Validate checks the fields the plugin cannot default.

type SesSmtpUser

type SesSmtpUser struct {
	AccountConfig `json:",inline" yaml:",inline"`
	// Name overrides the base name of the IAM resources (defaults to the
	// resource name in server.yaml).
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// Identities are SES identities the user may send from: verified domains
	// (`example.com`), email addresses (`noreply@example.com`) or full SES
	// identity ARNs. Required.
	Identities []string `json:"identities" yaml:"identities"`
	// ConfigurationSet, when set, is added to the policy resources so sends
	// that use it (X-SES-CONFIGURATION-SET header, or ConfigurationSetName on
	// the API) are authorized - SES authorizes such a send against both the
	// identity and the configuration set ARN - and is exposed to consumers as
	// `configuration-set`. For a set created by aws-ses-configuration-set
	// this is its full name, `<name>--<env>`.
	ConfigurationSet string `json:"configurationSet,omitempty" yaml:"configurationSet,omitempty"`
	// FromAddresses, when set, restricts sends with a `ses:FromAddress`
	// StringLike condition (wildcards allowed, e.g. `*@example.com`).
	FromAddresses []string `json:"fromAddresses,omitempty" yaml:"fromAddresses,omitempty"`
	// APIAccess additionally allows the SES v2 API: ses:SendEmail on the same
	// resources and under the same conditions as ses:SendRawEmail, plus
	// ses:GetAccount (read-only, not resource-scoped; API clients use it for
	// the sending quota). The access key ID and secret are then also
	// exported as `access-key` and `secret-key`.
	APIAccess bool `json:"apiAccess,omitempty" yaml:"apiAccess,omitempty"`
}

SesSmtpUser provisions Amazon SES SMTP credentials: a dedicated IAM user, an inline policy allowing only ses:SendRawEmail (the single action the SES SMTP interface needs) on the configured identities, and an access key whose SigV4-derived SMTP password is exported as a secret.

The SES identities themselves (domain verification, DKIM, MAIL FROM) are managed out of band; this resource only references them.

`region` (from the embedded AccountConfig) is the SES region the SMTP endpoint and the SMTP password are bound to. When omitted, the region of the `${auth:...}` credentials is used.

func (*SesSmtpUser) Validate

func (c *SesSmtpUser) Validate() error

Validate checks the fields the plugin cannot default.

type StateStorageConfig

type StateStorageConfig struct {
	AccountConfig `json:",inline" yaml:",inline"`
	BucketName    string `json:"bucketName" yaml:"bucketName"`
	Provision     bool   `json:"provision" yaml:"provision"`
}

func (*StateStorageConfig) IsProvisionEnabled

func (sa *StateStorageConfig) IsProvisionEnabled() bool

func (*StateStorageConfig) ProviderType

func (sa *StateStorageConfig) ProviderType() string

ProviderType overrides the embedded AccountConfig.ProviderType ("aws") with the state-storage type ("s3-bucket") so that SC core's login.go state-store init lookup — `pApi.InitStateStoreFuncByType[authCfg.ProviderType()]` — matches the key the plugin bus registers the sidecar under (plugin_preengine.go iterates `schema.GetStateStoreTypes()` and registers each as a typeToken). Without this override, the lookup falls through with "could not find init state storage function for provider \"aws\"" and no AWS_* env is exported, which breaks the Pulumi backend open with "Invalid region" (live-caught on forge-notifier staging redeploy 2026-10-30).

func (*StateStorageConfig) StorageUrl

func (sa *StateStorageConfig) StorageUrl() string

type StaticSiteInput

type StaticSiteInput struct {
	TemplateConfig        `json:"templateConfig" yaml:"templateConfig"`
	api.StackConfigStatic `json:",inline" yaml:",inline"`
	StackDir              string `json:"stackDir" yaml:"stackDir"`
	StackName             string `json:"stackName" yaml:"stackName"`

	// Top-level mirrors of StackConfigStatic.Site fields. SC core's
	// JSON marshal drops the `Site` subtree because `Site` is a NAMED
	// field with `json:",inline"` (trap 6 of the plugin extraction
	// playbook). Plugins that read `cfg.Site.X` directly off the wire
	// find X empty — live-caught 2026-11-02 on landing's forge-landing
	// deploy run 41409219496 after the SC CLI image floated to a
	// newer release and masked a latent defect.
	//
	// `ToStaticSiteConfig` populates these; the driver reads them with
	// a Site.* fallback via the EffectiveX accessors below. Clients
	// NEVER author these fields.
	SiteDomain             string `json:"siteDomain,omitempty" yaml:"siteDomain,omitempty"`
	SiteBaseDnsZone        string `json:"siteBaseDnsZone,omitempty" yaml:"siteBaseDnsZone,omitempty"`
	SiteIndexDocument      string `json:"siteIndexDocument,omitempty" yaml:"siteIndexDocument,omitempty"`
	SiteErrorDocument      string `json:"siteErrorDocument,omitempty" yaml:"siteErrorDocument,omitempty"`
	SiteProvisionWwwDomain *bool  `json:"siteProvisionWwwDomain,omitempty" yaml:"siteProvisionWwwDomain,omitempty"`
}

func (*StaticSiteInput) EffectiveBaseDnsZone

func (i *StaticSiteInput) EffectiveBaseDnsZone() string

EffectiveBaseDnsZone returns the resolved DNS zone, preferring the top-level SiteBaseDnsZone mirror over Site.BaseDnsZone.

func (*StaticSiteInput) EffectiveDomain

func (i *StaticSiteInput) EffectiveDomain() string

EffectiveDomain returns the resolved apex hostname, preferring the top-level SiteDomain mirror over Site.Domain (trap 6 drops the latter on the SC-core → plugin JSON marshal).

func (*StaticSiteInput) EffectiveErrorDocument

func (i *StaticSiteInput) EffectiveErrorDocument() string

EffectiveErrorDocument returns the resolved error page, preferring the top-level SiteErrorDocument mirror over Site.ErrorDocument.

func (*StaticSiteInput) EffectiveIndexDocument

func (i *StaticSiteInput) EffectiveIndexDocument() string

EffectiveIndexDocument returns the resolved index page, preferring the top-level SiteIndexDocument mirror over Site.IndexDocument.

func (*StaticSiteInput) EffectiveProvisionWwwDomain

func (i *StaticSiteInput) EffectiveProvisionWwwDomain() bool

EffectiveProvisionWwwDomain returns the resolved provisionWwwDomain bool, preferring the top-level SiteProvisionWwwDomain mirror.

func (*StaticSiteInput) OverriddenBaseZone

func (i *StaticSiteInput) OverriddenBaseZone() string

OverriddenBaseZone implements api.DnsConfigAware so the Cloudflare registrar uses the stack's baseDnsZone instead of the parent stack's default zone — otherwise records get created with the parent zone suffixed (e.g. simple-forge.com → simple-forge.com.simple-container.com).

type TemplateConfig

type TemplateConfig struct {
	AccountConfig `json:",inline" yaml:",inline"`
}

Jump to

Keyboard shortcuts

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