Documentation
¶
Index ¶
- type APIGatewayConfig
- type APIKeyConfig
- type AlarmConfig
- type AppHealthChecker
- type AttributeConfig
- type AuthenticationConfig
- type AuthorizerConfig
- type CORSConfig
- type CachingConfig
- type CheckResult
- type CloudWatchConfig
- type CustomDomainConfig
- type DNSConfig
- type DNSManager
- type DashboardConfig
- type DashboardWidget
- type DataReplicationConfig
- type DatabaseConfig
- type DeploymentConfig
- type DeploymentLogEntry
- type DeploymentResult
- type DeploymentStatusType
- type DeploymentStrategyConfig
- type EncryptionConfig
- type FailoverStrategy
- type FixedResponseConfig
- type ForwardActionConfig
- type GeolocationConfig
- type GlobalIndexConfig
- type GlobalLoadBalancer
- type HealthCheckConfig
- type HealthStatus
- type IAMRoleConfig
- type InfrastructureConfig
- type InfrastructureGenerator
- type InfrastructureProvider
- type InfrastructureTemplate
- type InlinePolicyConfig
- type KMSKeyConfig
- type LambdaConfig
- type LambdaDeployment
- type LambdaHealthStatus
- type ListenerAction
- type ListenerRule
- type LoadBalancerHealthCheck
- type LoadBalancerListener
- type LoadBalancingConfig
- type LocalIndexConfig
- type LogGroupConfig
- type MemoryHealthChecker
- type MetricFilterConfig
- type MonitoringConfig
- type MultiRegionConfig
- type MultiRegionDeployer
- func (mrd *MultiRegionDeployer) DeployAll(ctx context.Context, strategy DeploymentStrategyConfig) error
- func (mrd *MultiRegionDeployer) GetDeploymentStatus() map[string]RegionDeploymentStatus
- func (mrd *MultiRegionDeployer) GetHealthyRegions() []string
- func (mrd *MultiRegionDeployer) StartHealthMonitoring(ctx context.Context, interval time.Duration)
- type NetworkingConfig
- type Output
- type Parameter
- type ProjectionConfig
- type PulumiConfigManager
- type PulumiDeployer
- func (pd *PulumiDeployer) Deploy(ctx context.Context) (*DeploymentResult, error)
- func (pd *PulumiDeployer) Destroy(ctx context.Context) (*DeploymentResult, error)
- func (pd *PulumiDeployer) ExportLogs() ([]byte, error)
- func (pd *PulumiDeployer) GetDeploymentLogs() []DeploymentLogEntry
- func (pd *PulumiDeployer) GetStackOutputs(ctx context.Context) (map[string]any, error)
- func (pd *PulumiDeployer) Initialize(ctx context.Context, stackConfig PulumiStackConfig) error
- type PulumiOperationResult
- type PulumiResource
- type PulumiStackConfig
- type PulumiStackManager
- type RedirectActionConfig
- type RegionDeploymentStatus
- type RegionHealthChecker
- type RegionMetrics
- type Resource
- type ResourceHealthChecker
- type ResourceSummary
- type RuleCondition
- type S3ReplicationConfig
- type S3ReplicationRule
- type SecretConfig
- type SecretsConfig
- type SecurityConfig
- type SecurityGroupConfig
- type SecurityGroupRule
- type SubnetConfig
- type TableConfig
- type TableReplicationConfig
- type TargetConfig
- type TargetGroupConfig
- type TargetGroupWeight
- type ThrottlingConfig
- type VPCConfig
- type VPCEndpointConfig
- type WAFConfig
- type WAFRule
- type XRayConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIGatewayConfig ¶
type APIGatewayConfig struct {
Type string `json:"type"` // REST, HTTP, WebSocket
StageName string `json:"stage_name"`
CORS CORSConfig `json:"cors"`
Authentication AuthenticationConfig `json:"authentication"`
Throttling ThrottlingConfig `json:"throttling"`
Caching CachingConfig `json:"caching"`
CustomDomain *CustomDomainConfig `json:"custom_domain,omitempty"`
}
APIGatewayConfig holds API Gateway configuration
type APIKeyConfig ¶
type AlarmConfig ¶
type AlarmConfig struct {
Name string `json:"name"`
MetricName string `json:"metric_name"`
Namespace string `json:"namespace"`
Statistic string `json:"statistic"`
Threshold float64 `json:"threshold"`
ComparisonOperator string `json:"comparison_operator"`
EvaluationPeriods int `json:"evaluation_periods"`
Period int `json:"period"`
Actions []string `json:"actions"`
}
type AppHealthChecker ¶
type AppHealthChecker struct {
// contains filtered or unexported fields
}
AppHealthChecker checks the Lift app health
func (*AppHealthChecker) Check ¶
func (c *AppHealthChecker) Check(ctx context.Context) health.HealthStatus
func (*AppHealthChecker) Name ¶
func (c *AppHealthChecker) Name() string
type AttributeConfig ¶
type AuthenticationConfig ¶
type AuthenticationConfig struct {
Type string `json:"type"` // JWT, API_KEY, IAM, COGNITO
Authorizers []AuthorizerConfig `json:"authorizers,omitempty"`
APIKeys []APIKeyConfig `json:"api_keys,omitempty"`
}
type AuthorizerConfig ¶
type CORSConfig ¶
type CORSConfig struct {
AllowOrigins []string `json:"allow_origins"`
AllowMethods []string `json:"allow_methods"`
AllowHeaders []string `json:"allow_headers"`
ExposeHeaders []string `json:"expose_headers,omitempty"`
MaxAge int `json:"max_age,omitempty"`
AllowCredentials bool `json:"allow_credentials"`
}
type CachingConfig ¶
type CheckResult ¶
type CheckResult struct {
Status string `json:"status"`
Duration time.Duration `json:"duration"`
Message string `json:"message,omitempty"`
Error string `json:"error,omitempty"`
}
CheckResult represents individual health check result
type CloudWatchConfig ¶
type CloudWatchConfig struct {
LogGroups []LogGroupConfig `json:"log_groups"`
MetricFilters []MetricFilterConfig `json:"metric_filters,omitempty"`
RetentionDays int `json:"retention_days"`
}
type CustomDomainConfig ¶
type DNSConfig ¶
type DNSConfig struct {
DomainName string `json:"domain_name"`
HostedZoneId string `json:"hosted_zone_id"`
TTL int `json:"ttl"`
RoutingPolicy string `json:"routing_policy"` // weighted, latency, geolocation, failover
HealthCheckId string `json:"health_check_id,omitempty"`
SetIdentifier string `json:"set_identifier,omitempty"`
Weight int `json:"weight,omitempty"`
Geolocation GeolocationConfig `json:"geolocation,omitempty"`
}
DNSConfig defines DNS configuration
type DNSManager ¶
type DNSManager struct {
// contains filtered or unexported fields
}
DNSManager manages DNS records
func NewDNSManager ¶
func NewDNSManager(config DNSConfig) *DNSManager
NewDNSManager creates a new DNS manager
func (*DNSManager) UpdateRecords ¶
func (dm *DNSManager) UpdateRecords(ctx context.Context, regions []string) error
UpdateRecords updates DNS records for failover
type DashboardConfig ¶
type DashboardConfig struct {
Name string `json:"name"`
Widgets []DashboardWidget `json:"widgets"`
}
type DashboardWidget ¶
type DataReplicationConfig ¶
type DataReplicationConfig struct {
Enabled bool `json:"enabled"`
Strategy string `json:"strategy"` // active-active, active-passive, multi-master
ReplicationLag time.Duration `json:"replication_lag"`
ConflictResolution string `json:"conflict_resolution"` // last-write-wins, custom
Tables []TableReplicationConfig `json:"tables"`
S3Buckets []S3ReplicationConfig `json:"s3_buckets"`
}
DataReplicationConfig defines data replication configuration
type DatabaseConfig ¶
type DatabaseConfig struct {
Type string `json:"type"` // DynamoDB, RDS, Aurora
Tables []TableConfig `json:"tables,omitempty"`
GlobalTables bool `json:"global_tables"`
BackupEnabled bool `json:"backup_enabled"`
Encryption EncryptionConfig `json:"encryption"`
StreamEnabled bool `json:"stream_enabled"`
}
DatabaseConfig holds database configuration
type DeploymentConfig ¶
type DeploymentConfig struct {
Environment string `json:"environment"`
LogLevel string `json:"log_level"`
MetricsEnabled bool `json:"metrics_enabled"`
TracingEnabled bool `json:"tracing_enabled"`
HealthChecks []string `json:"health_checks"`
PreWarmTargets []string `json:"pre_warm_targets"`
TimeoutSeconds int `json:"timeout_seconds"`
MemoryMB int `json:"memory_mb"`
ColdStartOptim bool `json:"cold_start_optimization"`
GracefulTimeout time.Duration `json:"graceful_timeout"`
}
DeploymentConfig holds configuration for Lambda deployment
func DefaultDeploymentConfig ¶
func DefaultDeploymentConfig() *DeploymentConfig
DefaultDeploymentConfig returns production-ready default configuration
type DeploymentLogEntry ¶
type DeploymentLogEntry struct {
Timestamp time.Time `json:"timestamp"`
Level string `json:"level"`
Message string `json:"message"`
Resource string `json:"resource,omitempty"`
Operation string `json:"operation,omitempty"`
Status string `json:"status,omitempty"`
Error string `json:"error,omitempty"`
}
DeploymentLogEntry represents a deployment log entry
type DeploymentResult ¶
type DeploymentResult struct {
Success bool `json:"success"`
StackName string `json:"stack_name"`
Outputs map[string]any `json:"outputs"`
Resources []ResourceSummary `json:"resources"`
Duration time.Duration `json:"duration"`
Error string `json:"error,omitempty"`
Permalink string `json:"permalink,omitempty"`
UpdateID string `json:"update_id,omitempty"`
}
DeploymentResult represents the result of a deployment
type DeploymentStatusType ¶
type DeploymentStatusType string
DeploymentStatusType represents deployment status
const ( StatusPending DeploymentStatusType = "pending" StatusDeploying DeploymentStatusType = "deploying" StatusDeployed DeploymentStatusType = "deployed" StatusFailed DeploymentStatusType = "failed" StatusRollingBack DeploymentStatusType = "rolling_back" StatusRolledBack DeploymentStatusType = "rolled_back" )
type DeploymentStrategyConfig ¶
type DeploymentStrategyConfig struct {
Type string `json:"type"` // rolling, blue-green, canary
BatchSize int `json:"batch_size"`
BatchDelay time.Duration `json:"batch_delay"`
HealthCheckGracePeriod time.Duration `json:"health_check_grace_period"`
RollbackOnFailure bool `json:"rollback_on_failure"`
CanaryPercentage int `json:"canary_percentage,omitempty"`
CanaryDuration time.Duration `json:"canary_duration,omitempty"`
}
DeploymentStrategyConfig defines deployment strategy
type EncryptionConfig ¶
type FailoverStrategy ¶
type FailoverStrategy struct {
Type string `json:"type"` // automatic, manual
HealthCheckInterval time.Duration `json:"health_check_interval"`
FailureThreshold int `json:"failure_threshold"`
RecoveryThreshold int `json:"recovery_threshold"`
AutoFailback bool `json:"auto_failback"`
FailbackDelay time.Duration `json:"failback_delay"`
}
FailoverStrategy defines failover behavior
type FixedResponseConfig ¶
type FixedResponseConfig struct {
StatusCode string `json:"status_code"`
ContentType string `json:"content_type,omitempty"`
MessageBody string `json:"message_body,omitempty"`
}
FixedResponseConfig defines fixed response action
type ForwardActionConfig ¶
type ForwardActionConfig struct {
TargetGroups []TargetGroupWeight `json:"target_groups"`
}
ForwardActionConfig defines forward action
type GeolocationConfig ¶
type GeolocationConfig struct {
ContinentCode string `json:"continent_code,omitempty"`
CountryCode string `json:"country_code,omitempty"`
SubdivisionCode string `json:"subdivision_code,omitempty"`
}
GeolocationConfig defines geolocation routing
type GlobalIndexConfig ¶
type GlobalIndexConfig struct {
Name string `json:"name"`
HashKey string `json:"hash_key"`
RangeKey string `json:"range_key,omitempty"`
Projection ProjectionConfig `json:"projection"`
}
type GlobalLoadBalancer ¶
type GlobalLoadBalancer struct {
// contains filtered or unexported fields
}
GlobalLoadBalancer manages global load balancing
func NewGlobalLoadBalancer ¶
func NewGlobalLoadBalancer(config LoadBalancingConfig) *GlobalLoadBalancer
NewGlobalLoadBalancer creates a new global load balancer
func (*GlobalLoadBalancer) UpdateTrafficWeights ¶
func (glb *GlobalLoadBalancer) UpdateTrafficWeights(ctx context.Context, weights map[string]int) error
UpdateTrafficWeights updates traffic weights for canary deployment
type HealthCheckConfig ¶
type HealthCheckConfig struct {
Enabled bool `json:"enabled"`
Interval time.Duration `json:"interval"`
Timeout time.Duration `json:"timeout"`
HealthyThreshold int `json:"healthy_threshold"`
UnhealthyThreshold int `json:"unhealthy_threshold"`
Path string `json:"path"`
Port int `json:"port"`
Protocol string `json:"protocol"`
ExpectedCodes []int `json:"expected_codes"`
}
HealthCheckConfig defines health check configuration
type HealthStatus ¶
type HealthStatus string
HealthStatus represents health status
const ( HealthHealthy HealthStatus = "healthy" HealthUnhealthy HealthStatus = "unhealthy" HealthDegraded HealthStatus = "degraded" HealthUnknown HealthStatus = "unknown" )
type IAMRoleConfig ¶
type IAMRoleConfig struct {
Name string `json:"name"`
AssumeRolePolicy map[string]any `json:"assume_role_policy"`
Policies []string `json:"policies"`
InlinePolicies []InlinePolicyConfig `json:"inline_policies,omitempty"`
}
Additional supporting types
type InfrastructureConfig ¶
type InfrastructureConfig struct {
// Application settings
ApplicationName string `json:"application_name"`
Environment string `json:"environment"`
Region string `json:"region"`
MultiRegion bool `json:"multi_region"`
Regions []string `json:"regions,omitempty"`
// Lambda configuration
Lambda LambdaConfig `json:"lambda"`
// API Gateway configuration
APIGateway APIGatewayConfig `json:"api_gateway"`
// Database configuration
Database DatabaseConfig `json:"database"`
// Monitoring configuration
Monitoring MonitoringConfig `json:"monitoring"`
// Security configuration
Security SecurityConfig `json:"security"`
// Networking configuration
Networking NetworkingConfig `json:"networking"`
// Tags and metadata
Tags map[string]string `json:"tags"`
Metadata map[string]any `json:"metadata"`
}
InfrastructureConfig holds configuration for infrastructure generation
type InfrastructureGenerator ¶
type InfrastructureGenerator struct {
// contains filtered or unexported fields
}
InfrastructureGenerator generates infrastructure templates
func NewInfrastructureGenerator ¶
func NewInfrastructureGenerator(provider InfrastructureProvider, config InfrastructureConfig) *InfrastructureGenerator
NewInfrastructureGenerator creates a new infrastructure generator
func (*InfrastructureGenerator) ExportTemplate ¶
func (ig *InfrastructureGenerator) ExportTemplate(template *InfrastructureTemplate, format string) ([]byte, error)
ExportTemplate exports the template in the specified format
func (*InfrastructureGenerator) GenerateTemplate ¶
func (ig *InfrastructureGenerator) GenerateTemplate() (*InfrastructureTemplate, error)
GenerateTemplate generates a complete infrastructure template
func (*InfrastructureGenerator) ValidateTemplate ¶
func (ig *InfrastructureGenerator) ValidateTemplate(template *InfrastructureTemplate) error
ValidateTemplate validates the generated template
type InfrastructureProvider ¶
type InfrastructureProvider string
InfrastructureProvider defines the supported IaC providers
const ( ProviderPulumi InfrastructureProvider = "pulumi" ProviderTerraform InfrastructureProvider = "terraform" ProviderCloudFormation InfrastructureProvider = "cloudformation" ProviderCDK InfrastructureProvider = "cdk" )
type InfrastructureTemplate ¶
type InfrastructureTemplate struct {
Provider InfrastructureProvider `json:"provider"`
Name string `json:"name"`
Version string `json:"version"`
Description string `json:"description"`
Resources map[string]Resource `json:"resources"`
Outputs map[string]Output `json:"outputs"`
Parameters map[string]Parameter `json:"parameters"`
Metadata map[string]any `json:"metadata"`
Tags map[string]string `json:"tags"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
InfrastructureTemplate represents a complete infrastructure template
type InlinePolicyConfig ¶
type KMSKeyConfig ¶
type LambdaConfig ¶
type LambdaConfig struct {
Runtime string `json:"runtime"`
Handler string `json:"handler"`
Timeout int `json:"timeout"`
MemorySize int `json:"memory_size"`
ReservedConcurrency *int `json:"reserved_concurrency,omitempty"`
Environment map[string]string `json:"environment,omitempty"`
Layers []string `json:"layers,omitempty"`
DeadLetterQueue bool `json:"dead_letter_queue"`
VPCConfig *VPCConfig `json:"vpc_config,omitempty"`
}
LambdaConfig holds Lambda function configuration
type LambdaDeployment ¶
type LambdaDeployment struct {
// contains filtered or unexported fields
}
LambdaDeployment provides production-ready Lambda deployment infrastructure
func NewLambdaDeployment ¶
func NewLambdaDeployment(app *lift.App, config *DeploymentConfig) (*LambdaDeployment, error)
NewLambdaDeployment creates a new production-ready Lambda deployment
func (*LambdaDeployment) Handler ¶
func (d *LambdaDeployment) Handler() lambda.Handler
Handler returns the production-ready Lambda handler
func (*LambdaDeployment) HealthCheck ¶
func (d *LambdaDeployment) HealthCheck(ctx context.Context) (*LambdaHealthStatus, error)
HealthCheck performs comprehensive health check
type LambdaHealthStatus ¶
type LambdaHealthStatus struct {
Status string `json:"status"`
Timestamp time.Time `json:"timestamp"`
Environment string `json:"environment"`
Uptime time.Duration `json:"uptime"`
Checks map[string]CheckResult `json:"checks"`
}
LambdaHealthStatus represents the overall health status for Lambda deployment
type ListenerAction ¶
type ListenerAction struct {
Type string `json:"type"`
TargetGroupArn string `json:"target_group_arn,omitempty"`
RedirectConfig *RedirectActionConfig `json:"redirect_config,omitempty"`
FixedResponse *FixedResponseConfig `json:"fixed_response,omitempty"`
ForwardConfig *ForwardActionConfig `json:"forward_config,omitempty"`
}
ListenerAction defines listener action
type ListenerRule ¶
type ListenerRule struct {
Priority int `json:"priority"`
Conditions []RuleCondition `json:"conditions"`
Actions []ListenerAction `json:"actions"`
}
ListenerRule defines listener rule
type LoadBalancerHealthCheck ¶
type LoadBalancerHealthCheck struct {
Enabled bool `json:"enabled"`
HealthyThreshold int `json:"healthy_threshold"`
UnhealthyThreshold int `json:"unhealthy_threshold"`
Timeout time.Duration `json:"timeout"`
Interval time.Duration `json:"interval"`
Path string `json:"path"`
Port string `json:"port"`
Protocol string `json:"protocol"`
Matcher string `json:"matcher"`
}
LoadBalancerHealthCheck defines load balancer health check
type LoadBalancerListener ¶
type LoadBalancerListener struct {
Port int `json:"port"`
Protocol string `json:"protocol"`
SSLPolicy string `json:"ssl_policy,omitempty"`
CertificateArn string `json:"certificate_arn,omitempty"`
DefaultActions []ListenerAction `json:"default_actions"`
Rules []ListenerRule `json:"rules,omitempty"`
}
LoadBalancerListener defines load balancer listener
type LoadBalancingConfig ¶
type LoadBalancingConfig struct {
Type string `json:"type"` // application, network, classic
Scheme string `json:"scheme"` // internet-facing, internal
IpAddressType string `json:"ip_address_type"` // ipv4, dualstack
CrossZoneEnabled bool `json:"cross_zone_enabled"`
DeletionProtection bool `json:"deletion_protection"`
HealthCheck LoadBalancerHealthCheck `json:"health_check"`
Listeners []LoadBalancerListener `json:"listeners"`
TargetGroups []TargetGroupConfig `json:"target_groups"`
}
LoadBalancingConfig defines load balancing configuration
type LocalIndexConfig ¶
type LocalIndexConfig struct {
Name string `json:"name"`
RangeKey string `json:"range_key"`
Projection ProjectionConfig `json:"projection"`
}
type LogGroupConfig ¶
type MemoryHealthChecker ¶
type MemoryHealthChecker struct {
// contains filtered or unexported fields
}
MemoryHealthChecker checks memory usage with actual monitoring
func (*MemoryHealthChecker) Check ¶
func (c *MemoryHealthChecker) Check(ctx context.Context) health.HealthStatus
func (*MemoryHealthChecker) Name ¶
func (c *MemoryHealthChecker) Name() string
type MetricFilterConfig ¶
type MonitoringConfig ¶
type MonitoringConfig struct {
CloudWatch CloudWatchConfig `json:"cloudwatch"`
XRay XRayConfig `json:"xray"`
Alarms []AlarmConfig `json:"alarms"`
Dashboard DashboardConfig `json:"dashboard"`
}
MonitoringConfig holds monitoring configuration
type MultiRegionConfig ¶
type MultiRegionConfig struct {
PrimaryRegion string `json:"primary_region"`
Regions []string `json:"regions"`
FailoverStrategy FailoverStrategy `json:"failover_strategy"`
HealthCheck HealthCheckConfig `json:"health_check"`
DNS DNSConfig `json:"dns"`
LoadBalancing LoadBalancingConfig `json:"load_balancing"`
DataReplication DataReplicationConfig `json:"data_replication"`
DeploymentStrategy DeploymentStrategyConfig `json:"deployment_strategy"`
}
MultiRegionConfig holds multi-region deployment configuration
type MultiRegionDeployer ¶
type MultiRegionDeployer struct {
// contains filtered or unexported fields
}
MultiRegionDeployer orchestrates deployments across multiple regions
func NewMultiRegionDeployer ¶
func NewMultiRegionDeployer(config MultiRegionConfig, infraConfig InfrastructureConfig) *MultiRegionDeployer
NewMultiRegionDeployer creates a new multi-region deployer
func (*MultiRegionDeployer) DeployAll ¶
func (mrd *MultiRegionDeployer) DeployAll(ctx context.Context, strategy DeploymentStrategyConfig) error
DeployAll deploys to all regions using the specified strategy
func (*MultiRegionDeployer) GetDeploymentStatus ¶
func (mrd *MultiRegionDeployer) GetDeploymentStatus() map[string]RegionDeploymentStatus
GetDeploymentStatus returns the deployment status for all regions
func (*MultiRegionDeployer) GetHealthyRegions ¶
func (mrd *MultiRegionDeployer) GetHealthyRegions() []string
GetHealthyRegions returns a list of healthy regions
func (*MultiRegionDeployer) StartHealthMonitoring ¶
func (mrd *MultiRegionDeployer) StartHealthMonitoring(ctx context.Context, interval time.Duration)
StartHealthMonitoring starts continuous health monitoring
type NetworkingConfig ¶
type NetworkingConfig struct {
VPC *VPCConfig `json:"vpc,omitempty"`
Subnets []SubnetConfig `json:"subnets,omitempty"`
SecurityGroups []SecurityGroupConfig `json:"security_groups,omitempty"`
NATGateways bool `json:"nat_gateways"`
VPCEndpoints []VPCEndpointConfig `json:"vpc_endpoints,omitempty"`
}
NetworkingConfig holds networking configuration
type Output ¶
type Output struct {
Value any `json:"value"`
Description string `json:"description"`
Export bool `json:"export,omitempty"`
}
Output represents a template output
type Parameter ¶
type Parameter struct {
Type string `json:"type"`
Description string `json:"description"`
Default any `json:"default,omitempty"`
AllowedValues []any `json:"allowed_values,omitempty"`
MinLength *int `json:"min_length,omitempty"`
MaxLength *int `json:"max_length,omitempty"`
Pattern string `json:"pattern,omitempty"`
}
Parameter represents a template parameter
type ProjectionConfig ¶
type PulumiConfigManager ¶
type PulumiConfigManager struct {
// contains filtered or unexported fields
}
PulumiConfigManager manages Pulumi configuration
func NewPulumiConfigManager ¶
func NewPulumiConfigManager() *PulumiConfigManager
NewPulumiConfigManager creates a new config manager
func (*PulumiConfigManager) GetConfig ¶
func (pcm *PulumiConfigManager) GetConfig(stackName string) (PulumiStackConfig, bool)
GetConfig retrieves configuration for a stack
func (*PulumiConfigManager) SetConfig ¶
func (pcm *PulumiConfigManager) SetConfig(stackName string, config PulumiStackConfig)
SetConfig sets configuration for a stack
type PulumiDeployer ¶
type PulumiDeployer struct {
// contains filtered or unexported fields
}
PulumiDeployer handles Pulumi-specific deployments using CLI automation
func NewPulumiDeployer ¶
func NewPulumiDeployer(projectName, stackName, region string, config InfrastructureConfig) *PulumiDeployer
NewPulumiDeployer creates a new Pulumi deployer with CLI automation
func (*PulumiDeployer) Deploy ¶
func (pd *PulumiDeployer) Deploy(ctx context.Context) (*DeploymentResult, error)
Deploy deploys the infrastructure using Pulumi CLI
func (*PulumiDeployer) Destroy ¶
func (pd *PulumiDeployer) Destroy(ctx context.Context) (*DeploymentResult, error)
Destroy destroys the infrastructure using Pulumi CLI
func (*PulumiDeployer) ExportLogs ¶
func (pd *PulumiDeployer) ExportLogs() ([]byte, error)
ExportLogs exports deployment logs in JSON format
func (*PulumiDeployer) GetDeploymentLogs ¶
func (pd *PulumiDeployer) GetDeploymentLogs() []DeploymentLogEntry
GetDeploymentLogs returns the deployment logs
func (*PulumiDeployer) GetStackOutputs ¶
GetStackOutputs retrieves the current stack outputs using Pulumi CLI
func (*PulumiDeployer) Initialize ¶
func (pd *PulumiDeployer) Initialize(ctx context.Context, stackConfig PulumiStackConfig) error
Initialize initializes the Pulumi workspace and stack using CLI
type PulumiOperationResult ¶
type PulumiOperationResult struct {
Version int `json:"version"`
Kind string `json:"kind"`
Stack string `json:"stack"`
Project string `json:"project"`
Result string `json:"result"`
Outputs map[string]any `json:"outputs"`
Resources []PulumiResource `json:"resources"`
}
PulumiOperationResult represents the result of a Pulumi CLI operation
type PulumiResource ¶
type PulumiResource struct {
URN string `json:"urn"`
Type string `json:"type"`
Custom bool `json:"custom"`
ID string `json:"id,omitempty"`
}
PulumiResource represents a resource in Pulumi output
type PulumiStackConfig ¶
type PulumiStackConfig struct {
ProjectName string `json:"project_name"`
StackName string `json:"stack_name"`
Region string `json:"region"`
BackendURL string `json:"backend_url,omitempty"`
SecretsProvider string `json:"secrets_provider,omitempty"`
Config map[string]string `json:"config"`
Tags map[string]string `json:"tags"`
}
PulumiStackConfig holds Pulumi stack configuration
type PulumiStackManager ¶
type PulumiStackManager struct {
// contains filtered or unexported fields
}
PulumiStackManager manages multiple Pulumi stacks
func NewPulumiStackManager ¶
func NewPulumiStackManager() *PulumiStackManager
NewPulumiStackManager creates a new stack manager
func (*PulumiStackManager) AddStack ¶
func (psm *PulumiStackManager) AddStack(name string, deployer *PulumiDeployer)
AddStack adds a stack to the manager
func (*PulumiStackManager) GetStack ¶
func (psm *PulumiStackManager) GetStack(name string) (*PulumiDeployer, bool)
GetStack retrieves a stack from the manager
func (*PulumiStackManager) ListStacks ¶
func (psm *PulumiStackManager) ListStacks() []string
ListStacks returns all stack names
type RedirectActionConfig ¶
type RedirectActionConfig struct {
Protocol string `json:"protocol,omitempty"`
Port string `json:"port,omitempty"`
Host string `json:"host,omitempty"`
Path string `json:"path,omitempty"`
Query string `json:"query,omitempty"`
StatusCode string `json:"status_code"`
}
RedirectActionConfig defines redirect action
type RegionDeploymentStatus ¶
type RegionDeploymentStatus struct {
Region string `json:"region"`
Status DeploymentStatusType `json:"status"`
Health HealthStatus `json:"health"`
LastDeployed time.Time `json:"last_deployed"`
LastHealthCheck time.Time `json:"last_health_check"`
Endpoints map[string]string `json:"endpoints"`
Metrics RegionMetrics `json:"metrics"`
Error string `json:"error,omitempty"`
}
RegionDeploymentStatus represents the deployment status of a region
type RegionHealthChecker ¶
type RegionHealthChecker struct {
// contains filtered or unexported fields
}
RegionHealthChecker checks the health of a region
func NewRegionHealthChecker ¶
func NewRegionHealthChecker(region string, config HealthCheckConfig) *RegionHealthChecker
NewRegionHealthChecker creates a new region health checker
func (*RegionHealthChecker) CheckHealth ¶
func (rhc *RegionHealthChecker) CheckHealth(ctx context.Context, endpoint string) error
CheckHealth checks the health of an endpoint
type RegionMetrics ¶
type RegionMetrics struct {
Latency time.Duration `json:"latency"`
ErrorRate float64 `json:"error_rate"`
RequestCount int64 `json:"request_count"`
Availability float64 `json:"availability"`
LastUpdated time.Time `json:"last_updated"`
}
RegionMetrics holds metrics for a region
type Resource ¶
type Resource struct {
Type string `json:"type"`
Name string `json:"name"`
Properties map[string]any `json:"properties"`
Dependencies []string `json:"dependencies,omitempty"`
Condition string `json:"condition,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
Tags map[string]string `json:"tags,omitempty"`
}
Resource represents an infrastructure resource
type ResourceHealthChecker ¶
type ResourceHealthChecker struct {
// contains filtered or unexported fields
}
ResourceHealthChecker checks resource availability with actual monitoring
func (*ResourceHealthChecker) Check ¶
func (c *ResourceHealthChecker) Check(ctx context.Context) health.HealthStatus
func (*ResourceHealthChecker) Name ¶
func (c *ResourceHealthChecker) Name() string
type ResourceSummary ¶
type ResourceSummary struct {
Type string `json:"type"`
Name string `json:"name"`
URN string `json:"urn"`
Status string `json:"status"`
}
ResourceSummary represents a summary of a deployed resource
type RuleCondition ¶
RuleCondition defines rule condition
type S3ReplicationConfig ¶
type S3ReplicationConfig struct {
SourceBucket string `json:"source_bucket"`
DestinationBuckets []string `json:"destination_buckets"`
ReplicationRules []S3ReplicationRule `json:"replication_rules"`
}
S3ReplicationConfig defines S3 replication
type S3ReplicationRule ¶
type S3ReplicationRule struct {
Id string `json:"id"`
Status string `json:"status"`
Prefix string `json:"prefix,omitempty"`
Priority int `json:"priority,omitempty"`
}
S3ReplicationRule defines S3 replication rule
type SecretConfig ¶
type SecretsConfig ¶
type SecretsConfig struct {
Secrets []SecretConfig `json:"secrets"`
}
type SecurityConfig ¶
type SecurityConfig struct {
IAMRoles []IAMRoleConfig `json:"iam_roles"`
KMSKeys []KMSKeyConfig `json:"kms_keys"`
SecretsManager SecretsConfig `json:"secrets_manager"`
WAF *WAFConfig `json:"waf,omitempty"`
VPCEndpoints []VPCEndpointConfig `json:"vpc_endpoints,omitempty"`
}
SecurityConfig holds security configuration
type SecurityGroupConfig ¶
type SecurityGroupConfig struct {
Name string `json:"name"`
Description string `json:"description"`
IngressRules []SecurityGroupRule `json:"ingress_rules"`
EgressRules []SecurityGroupRule `json:"egress_rules"`
}
type SecurityGroupRule ¶
type SubnetConfig ¶
type TableConfig ¶
type TableConfig struct {
Name string `json:"name"`
BillingMode string `json:"billing_mode"`
HashKey string `json:"hash_key"`
RangeKey string `json:"range_key,omitempty"`
Attributes []AttributeConfig `json:"attributes"`
GlobalIndexes []GlobalIndexConfig `json:"global_indexes,omitempty"`
LocalIndexes []LocalIndexConfig `json:"local_indexes,omitempty"`
StreamEnabled bool `json:"stream_enabled"`
BackupEnabled bool `json:"backup_enabled"`
}
type TableReplicationConfig ¶
type TableReplicationConfig struct {
TableName string `json:"table_name"`
Regions []string `json:"regions"`
GlobalTables bool `json:"global_tables"`
StreamEnabled bool `json:"stream_enabled"`
}
TableReplicationConfig defines table replication
type TargetConfig ¶
TargetConfig defines target configuration
type TargetGroupConfig ¶
type TargetGroupConfig struct {
Name string `json:"name"`
Port int `json:"port"`
Protocol string `json:"protocol"`
TargetType string `json:"target_type"`
HealthCheck LoadBalancerHealthCheck `json:"health_check"`
Targets []TargetConfig `json:"targets"`
Attributes map[string]string `json:"attributes"`
}
TargetGroupConfig defines target group configuration
type TargetGroupWeight ¶
type TargetGroupWeight struct {
TargetGroupArn string `json:"target_group_arn"`
Weight int `json:"weight"`
}
TargetGroupWeight defines target group weight
type ThrottlingConfig ¶
type VPCConfig ¶
type VPCConfig struct {
CIDR string `json:"cidr"`
EnableDNSSupport bool `json:"enable_dns_support"`
EnableDNSHostnames bool `json:"enable_dns_hostnames"`
AvailabilityZones []string `json:"availability_zones"`
}
Supporting configuration types