Documentation
¶
Index ¶
- func ResolveProvider(platform string) (v1alpha1.InfrastructureProvider, error)
- type ComputeType
- func (c ComputeType) IsZero() bool
- func (c ComputeType) MarshalJSON() ([]byte, error)
- func (c ComputeType) MarshalText() ([]byte, error)
- func (c ComputeType) MarshalYAML() (any, error)
- func (c ComputeType) String() string
- func (c *ComputeType) UnmarshalJSON(text []byte) error
- func (c *ComputeType) UnmarshalText(text []byte) error
- func (c *ComputeType) UnmarshalYAML(node *yaml.Node) error
- type Generator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResolveProvider ¶
func ResolveProvider(platform string) (v1alpha1.InfrastructureProvider, error)
ResolveProvider maps a deployment platform string to its InfrastructureProvider. Only aws, gcp, and azure are supported for infrastructure generation.
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.InfrastructureProvider, deployment v1alpha1.TypeDeployment) (ComputeType, error)
ResolveComputeType derives the appropriate ComputeType from a cloud provider 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) ([]types.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.