aws

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoInstanceState = errors.New("unable to get instance state")
	ErrNoAddressFound  = errors.New("unable to get public IP address info on AWS")
)

Functions

func CheckKeyPairExists

func CheckKeyPairExists(ec2Svc *ec2.EC2, kpName string) (bool, error)

CheckKeyPairExists checks that key pair kpName exists in the AWS region and returns the key pair object

func CheckSecurityGroupExists

func CheckSecurityGroupExists(ec2Svc *ec2.EC2, sgName string) (bool, *ec2.SecurityGroup, error)

CheckSecurityGroupExists checks that security group sgName exists in the AWS region and returns the security group object

func CheckUserIPInSg

func CheckUserIPInSg(sg *ec2.SecurityGroup, currentIP string, port int64) bool

CheckUserIPInSg checks that the user's current IP address is included in the whitelisted security group sg in AWS so that user can ssh into ec2 instance

func GetInstancePublicIPs added in v1.3.3

func GetInstancePublicIPs(ec2Svc *ec2.EC2, nodeIDs []string) (map[string]string, error)

GetInstancePublicIPs gets public IP(s) of EC2 instance(s) without elastic IP and returns a map with ec2 instance id as key and public ip as value

func GetUbuntuAMIID

func GetUbuntuAMIID(ec2Svc *ec2.EC2) (string, error)

func StopAWSNode added in v1.3.3

func StopAWSNode(ec2Svc *ec2.EC2, nodeConfig models.NodeConfig, clusterName string) error

func StopInstance

func StopInstance(ec2Svc *ec2.EC2, instanceID, publicIP string, releasePublicIP bool) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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