Documentation
¶
Index ¶
- Variables
- func CheckInstanceIsRunning(ec2Svc *ec2.EC2, nodeID string) (bool, error)
- func CheckKeyPairExists(ec2Svc *ec2.EC2, kpName string) (bool, error)
- func CheckSecurityGroupExists(ec2Svc *ec2.EC2, sgName string) (bool, *ec2.SecurityGroup, error)
- func CheckUserIPInSg(sg *ec2.SecurityGroup, currentIP string, port int64) bool
- func GetUbuntuAMIID(ec2Svc *ec2.EC2) (string, error)
- func StopInstance(ec2Svc *ec2.EC2, instanceID, publicIP string, releasePublicIP bool) error
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 CheckInstanceIsRunning ¶
CheckInstanceIsRunning checks that EC2 instance nodeID is running in AWS
func CheckKeyPairExists ¶
CheckKeyPairExists checks that key pair kpName exists in the AWS region and returns the key pair object
func CheckSecurityGroupExists ¶
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
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.