compute

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OutputHost       string = "Host"
	OutputUsername   string = "Username"
	OutputPrivateKey string = "PrivateKey"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Compute

type Compute struct {
	Specs      *supportMatrix.SupportedHost
	Name       string
	Username   string
	Instance   *ec2.Instance
	InstanceIP pulumi.StringOutput
	AWSKeyPair *ec2.KeyPair
	SG         []*ec2.SecurityGroup
	// contains value if key is created within this module
	PrivateKey *tls.PrivateKey
}

Related resources created within the compute asset

func (*Compute) OutputHost

func (r *Compute) OutputHost() string

func (*Compute) OutputPrivateKey

func (r *Compute) OutputPrivateKey() string

func (*Compute) OutputUsername

func (r *Compute) OutputUsername() string

type ComputeRequest

type ComputeRequest interface {
	GetAMI(ctx *pulumi.Context) (*ec2.LookupAmiResult, error)
	GetDedicatedHost(ctx *pulumi.Context) (*ec2.DedicatedHost, error)
	// In case a host has any specific ingress rule, this ingress rule will take effect on a SG
	// with egress to all in case of specific SG it is required to define them within CustomSecurityGroups
	CustomIngressRules() []securityGroup.IngressRules
	CustomSecurityGroups(ctx *pulumi.Context) ([]*ec2.SecurityGroup, error)
	GetPostScript() (string, error)
}

Methods to be implemented by any specific type of compute supported these methods implement specifics on each different type

type Request

type Request struct {
	ProjecName        string
	Specs             *supportMatrix.SupportedHost
	Public            bool
	BastionSG         *ec2.SecurityGroup
	KeyPair           *ec2.KeyPair
	VPC               *ec2.Vpc
	AvailabilityZones []string
	Subnets           []*ec2.Subnet
	SpotPrice         string
}

Composable resources and information provided to create a compute asset

func (*Request) Create

func (r *Request) Create(ctx *pulumi.Context, computeRequested ComputeRequest) (*Compute, error)

func (*Request) CustomIngressRules

func (r *Request) CustomIngressRules() []securityGroup.IngressRules

func (*Request) CustomSecurityGroups

func (r *Request) CustomSecurityGroups(ctx *pulumi.Context) ([]*ec2.SecurityGroup, error)

func (*Request) GetAMI

func (r *Request) GetAMI(ctx *pulumi.Context) (*ec2.LookupAmiResult, error)

func (*Request) GetDedicatedHost

func (r *Request) GetDedicatedHost(ctx *pulumi.Context) (*ec2.DedicatedHost, error)

func (*Request) GetName

func (r *Request) GetName() string

func (*Request) GetPostScript

func (r *Request) GetPostScript() (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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