infrastructure

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveProvider

func ResolveProvider(platform v1alpha1.Platform) (v1alpha1.Platform, error)

ResolveProvider normalizes a deployment platform to the cloud platform that hosts it. Only the cloud platforms (aws, gcp, azure) and ECS resolve; managed platforms (render, coolify, railway) have no IaC backing.

Types

type ComputeType

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

ComputeType identifies the compute resource type for a given cloud provider. It is an internal type resolved from the provider + deployment combination — users do not set this directly.

var (
	// AWS compute types.
	ComputeTypeEC2 ComputeType = ComputeType{/* contains filtered or unexported fields */}
	ComputeTypeEKS ComputeType = ComputeType{/* contains filtered or unexported fields */}
	// GCP compute types.
	ComputeTypeGCE ComputeType = ComputeType{/* contains filtered or unexported fields */}
	ComputeTypeGKE ComputeType = ComputeType{/* contains filtered or unexported fields */}
	// Azure compute types.
	ComputeTypeVM  ComputeType = ComputeType{/* contains filtered or unexported fields */}
	ComputeTypeAKS ComputeType = ComputeType{/* contains filtered or unexported fields */}
)

func ComputeTypes

func ComputeTypes() []ComputeType

func ResolveComputeType

func ResolveComputeType(provider v1alpha1.Platform, deployment v1alpha1.TypeDeployment) (ComputeType, error)

ResolveComputeType derives the appropriate ComputeType from a cloud platform and deployment configuration. Users do not specify the compute type directly — foundry resolves it automatically using this matrix:

AWS   + kubernetes (any flavor) → EKS
AWS   + anything else           → EC2
GCP   + kubernetes (any flavor) → GKE
GCP   + anything else           → GCE
Azure + kubernetes (any flavor) → AKS
Azure + anything else           → VM

func (ComputeType) IsZero

func (c ComputeType) IsZero() bool

func (ComputeType) MarshalJSON

func (c ComputeType) MarshalJSON() ([]byte, error)

func (ComputeType) MarshalText

func (c ComputeType) MarshalText() ([]byte, error)

func (ComputeType) MarshalYAML

func (c ComputeType) MarshalYAML() (any, error)

func (ComputeType) String

func (c ComputeType) String() string

func (*ComputeType) UnmarshalJSON

func (c *ComputeType) UnmarshalJSON(text []byte) error

func (*ComputeType) UnmarshalText

func (c *ComputeType) UnmarshalText(text []byte) error

func (*ComputeType) UnmarshalYAML

func (c *ComputeType) UnmarshalYAML(node *yaml.Node) error

type Generator

type Generator interface {
	// Generate produces IaC materials from the casting configuration.
	Generate(ctx context.Context, config v1alpha1.Casting) ([]domain.Material, error)

	// Validate runs the IaC tool's built-in validation (e.g., terraform validate)
	// against the manifests written to poursPath.
	Validate(ctx context.Context, poursPath string) error
}

Generator is the interface for infrastructure-as-code generators. Implementations produce IaC manifests (e.g., Terraform, Pulumi) from a casting configuration and can validate the generated output using the underlying tool.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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