ec2

package
v0.0.0-...-351f9be Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigurationFileKey = "awsEC2Configs"

The json/yaml config key for the AWSEC2onfig

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSEC2Config

type AWSEC2Config struct {
	InstanceType       string   `json:"instanceType" yaml:"instanceType"`
	AWSRegionAZ        string   `json:"awsRegionAZ" yaml:"awsRegionAZ"`
	AWSAMI             string   `json:"awsAMI" yaml:"awsAMI"`
	AWSSecurityGroups  []string `json:"awsSecurityGroups" yaml:"awsSecurityGroups"`
	AWSSSHKeyName      string   `json:"awsSSHKeyName" yaml:"awsSSHKeyName"`
	AWSCICDInstanceTag string   `json:"awsCICDInstanceTag" yaml:"awsCICDInstanceTag"`
	AWSIAMProfile      string   `json:"awsIAMProfile" yaml:"awsIAMProfile"`
	AWSUser            string   `json:"awsUser" yaml:"awsUser"`
	VolumeSize         int      `json:"volumeSize" yaml:"volumeSize"`
	Roles              []string `json:"roles" yaml:"roles"`
}

AWSEC2Config is the instance-specific configuration needed to launch ec2 instances in AWS

type AWSEC2Configs

type AWSEC2Configs struct {
	AWSEC2Config       []AWSEC2Config `json:"awsEC2Config" yaml:"awsEC2Config"`
	AWSAccessKeyID     string         `json:"awsAccessKeyID" yaml:"awsAccessKeyID"`
	AWSSecretAccessKey string         `json:"awsSecretAccessKey" yaml:"awsSecretAccessKey"`
	Region             string         `json:"region" yaml:"region"`
}

AWSEC2Configs is the AWS authentication configuration for accessing and launching ec2 instances

type Client

type Client struct {
	SVC          *ec2.EC2
	ClientConfig *AWSEC2Configs
}

Client is a struct that wraps the needed AWSEC2Config object, and ec2.EC2 which makes the actual calls to aws.

func NewClient

func NewClient() (*Client, error)

NewClient is a constructor that creates an *Client which a wrapper for a "github.com/aws/aws-sdk-go/service/ec2" session and the aws ec2 config.

Jump to

Keyboard shortcuts

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