ec2

package
v0.78.2 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: Apache-2.0 Imports: 23 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InstallECRCredentialsHelper

func InstallECRCredentialsHelper(e aws.Environment, vm *remote.Host) (command.Command, error)

func NewVM

func NewVM(e aws.Environment, name string, params ...VMOption) (*remote.Host, error)

NewVM creates an EC2 Instance and returns a Remote component. Without any parameter it creates an Ubuntu VM on AMD64 architecture.

func Run added in v0.75.0

func Run(ctx *pulumi.Context, awsEnv aws.Environment, env outputs.HostOutputs, params *Params) error

Run deploys an environment given a pulumi.Context. It accepts HostOutputs interface, which is implemented by both: - outputs.Host (lightweight, for scenarios without test dependencies) - environments.Host (full-featured, for test provisioners)

func VMRun

func VMRun(ctx *pulumi.Context) error

VMRun is the entry point for the scenario when run via pulumi. It uses outputs.Host which is lightweight and doesn't pull in test dependencies.

Types

type Option added in v0.75.0

type Option func(*Params) error

Option is a provisioner option.

func WithAgentClientOptions added in v0.75.0

func WithAgentClientOptions(opts ...agentclientparams.Option) Option

WithAgentClientOptions adds options to the Agent client.

func WithAgentOptions added in v0.75.0

func WithAgentOptions(opts ...agentparams.Option) Option

WithAgentOptions adds options to the Agent.

func WithDocker added in v0.75.0

func WithDocker() Option

WithDocker installs docker on the VM

func WithEC2InstanceOptions added in v0.75.0

func WithEC2InstanceOptions(opts ...VMOption) Option

WithEC2InstanceOptions adds options to the EC2 VM.

func WithFakeIntakeOptions added in v0.75.0

func WithFakeIntakeOptions(opts ...fakeintake.Option) Option

WithFakeIntakeOptions adds options to the FakeIntake.

func WithName added in v0.75.0

func WithName(name string) Option

WithName sets the name of the provisioner.

func WithUpdater added in v0.75.0

func WithUpdater() Option

WithUpdater installs the agent through the updater.

func WithoutAgent added in v0.75.0

func WithoutAgent() Option

WithoutAgent disables the creation of the Agent.

func WithoutFakeIntake added in v0.75.0

func WithoutFakeIntake() Option

WithoutFakeIntake disables the creation of the FakeIntake.

type Params added in v0.75.0

type Params struct {
	Name string
	// contains filtered or unexported fields
}

Params is a set of parameters for the Host environment.

func GetParams added in v0.75.0

func GetParams(opts ...Option) *Params

GetParams return Params from options opts setup

func ParamsFromEnvironment added in v0.75.0

func ParamsFromEnvironment(e aws.Environment) *Params

ParamsFromEnvironment builds Params by reading the configuration from the given AWS environment. It maps ConfigMap-driven flags to the EC2 scenario run parameters, keeping sensible defaults.

type VMOption

type VMOption = func(*vmArgs) error

func WithAMI

func WithAMI(ami string, osDesc os.Descriptor, arch os.Architecture) VMOption

WithAMI sets the AMI directly, skipping resolve process. `supportedOS` and `arch` must match the AMI requirements.

func WithHostID

func WithHostID(hostID string) VMOption

WithHostId sets the dedicated host ID for the instance

func WithIMDSv1Disable

func WithIMDSv1Disable() VMOption

func WithInstanceProfile

func WithInstanceProfile(instanceProfile string) VMOption

func WithInstanceType

func WithInstanceType(instanceType string) VMOption

WithInstanceType set the instance type

func WithLatestAMI

func WithLatestAMI() VMOption

WithLatestAMI sets the latest AMI for the OS and architecture.

func WithOS

func WithOS(osDesc os.Descriptor) VMOption

WithOS sets the OS Version defaults to latest

func WithOSArch

func WithOSArch(osDesc os.Descriptor, arch os.Architecture) VMOption

WithArch set the architecture and the operating system. Version defaults to latest

func WithPulumiResourceOptions

func WithPulumiResourceOptions(options ...pulumi.ResourceOption) VMOption

func WithTenancy

func WithTenancy(tenancy string) VMOption

WithTenancy sets the tenancy for the instance

func WithUserData

func WithUserData(userData string) VMOption

WithUserData set the userdata for the instance. User data contains commands that are run at the startup of the instance.

func WithVolumeThroughput added in v0.77.0

func WithVolumeThroughput(throughput int) VMOption

WithVolumeThroughput sets the throughput for the root GP3 volume in MiB/s. Valid range: 125-1000. Default is 125 MiB/s if not specified. This option only applies to GP3 volumes.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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