aws

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MPL-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommandArgsSSMTunneling added in v0.0.14

func CommandArgsSSMTunneling(instanceID string, localPort int) ([]string, error)

func CreateDevpodInstanceProfile added in v0.0.3

func CreateDevpodInstanceProfile(ctx context.Context, provider *AwsProvider) (string, error)

func CreateDevpodSecurityGroup

func CreateDevpodSecurityGroup(ctx context.Context, provider *AwsProvider) (string, error)

func Delete

func Delete(ctx context.Context, provider *AwsProvider, machine Machine) error

func DeleteDevpodRoute53Record added in v0.0.15

func DeleteDevpodRoute53Record(ctx context.Context, provider *AwsProvider, zone route53Zone, machine Machine) error

DeleteDevpodRoute53Record deletes a Route53 A record for the devpod hostname in the specified zone.

func GetAMIRootDevice added in v0.0.9

func GetAMIRootDevice(ctx context.Context, cfg aws.Config, diskImage string) (string, error)

func GetDefaultAMI

func GetDefaultAMI(ctx context.Context, cfg aws.Config, instanceType string) (string, error)

func GetDevpodInstanceProfile added in v0.0.3

func GetDevpodInstanceProfile(ctx context.Context, provider *AwsProvider) (string, error)

func GetDevpodRoute53Zone added in v0.0.15

func GetDevpodRoute53Zone(ctx context.Context, provider *AwsProvider) (route53Zone, error)

GetDevpodRoute53Zone retrieves the Route53 zone for the devpod if applicable. A zone name can either be specified in the provider configuration or be detected by looking for a Route53 zone with a tag "devpod" with value "devpod".

func GetDevpodSecurityGroups added in v0.0.8

func GetDevpodSecurityGroups(ctx context.Context, provider *AwsProvider) ([]string, error)

func GetDevpodVPC added in v0.0.3

func GetDevpodVPC(ctx context.Context, provider *AwsProvider) (string, error)

func GetInjectKeypairScript

func GetInjectKeypairScript(dir string) (string, error)

func GetInstanceTags added in v0.0.5

func GetInstanceTags(providerAws *AwsProvider, zone route53Zone) []types.TagSpecification

func GetSubnet added in v0.0.15

func GetSubnet(ctx context.Context, provider *AwsProvider) (string, error)

func NewAWSConfig added in v0.0.15

func NewAWSConfig(ctx context.Context, logs log.Logger, options *options.Options) (aws.Config, error)

func Start

func Start(ctx context.Context, cfg aws.Config, instanceID string) error

func Status

func Status(ctx context.Context, cfg aws.Config, name string) (client.Status, error)

func Stop

func Stop(ctx context.Context, cfg aws.Config, instanceID string) error

func UpsertDevpodRoute53Record added in v0.0.15

func UpsertDevpodRoute53Record(ctx context.Context, provider *AwsProvider, route53ZoneId string, hostname string, ip string) error

UpsertDevpodRoute53Record creates or updates a Route53 A record for the devpod hostname in the specified zone.

Types

type AwsProvider

type AwsProvider struct {
	Config           *options.Options
	AwsConfig        aws.Config
	Log              log.Logger
	WorkingDirectory string
}

func NewProvider

func NewProvider(ctx context.Context, withFolder bool, logs log.Logger) (*AwsProvider, error)

type Machine added in v0.0.15

type Machine struct {
	Status                string
	InstanceID            string
	SpotInstanceRequestId string
	PublicIP              string
	PrivateIP             string
	Hostname              string
}

func Create

func Create(
	ctx context.Context,
	cfg aws.Config,
	providerAws *AwsProvider,
) (Machine, error)

func GetDevpodInstance

func GetDevpodInstance(
	ctx context.Context,
	cfg aws.Config,
	name string,
) (Machine, error)

func GetDevpodRunningInstance

func GetDevpodRunningInstance(
	ctx context.Context,
	cfg aws.Config,
	name string,
) (Machine, error)

func GetDevpodStoppedInstance

func GetDevpodStoppedInstance(
	ctx context.Context,
	cfg aws.Config,
	name string,
) (Machine, error)

func NewMachineFromInstance added in v0.0.15

func NewMachineFromInstance(instance types.Instance) Machine

NewMachineFromInstance creates a new Machine struct from an AWS ec2 Instance struct

func (Machine) Host added in v0.0.15

func (m Machine) Host() string

Jump to

Keyboard shortcuts

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