Documentation
¶
Index ¶
- func CheckIsInstalled() error
- func GetInstanceIDs(terraformDir string) ([]string, error)
- func GetPublicIPs(terraformDir string) ([]string, error)
- func InitConf() (*hclwrite.File, *hclwrite.Body, error)
- func RemoveDirectory(terraformDir string) error
- func RunTerraform(terraformDir string) ([]string, []string, error)
- func SaveConf(terraformDir string, hclFile *hclwrite.File) error
- func SetCloudCredentials(rootBody *hclwrite.Body, region string) error
- func SetElasticIPs(rootBody *hclwrite.Body, numNodes uint32)
- func SetKeyPair(rootBody *hclwrite.Body, keyName, certName string)
- func SetOutput(rootBody *hclwrite.Body)
- func SetSecurityGroup(rootBody *hclwrite.Body, ipAddress, securityGroupName string)
- func SetSecurityGroupRule(rootBody *hclwrite.Body, ipAddress, sgID string, ipInTCP, ipInHTTP bool)
- func SetupInstances(rootBody *hclwrite.Body, securityGroupName string, useExistingKeyPair bool, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckIsInstalled ¶
func CheckIsInstalled() error
func GetInstanceIDs ¶ added in v1.3.1
func GetPublicIPs ¶ added in v1.3.1
func InitConf ¶
InitConf creates hclFile where we define all terraform configuration in hclFile.Body() and create .tf file where we save the content in
func RemoveDirectory ¶
RemoveDirectory remove terraform directory in .avalanche-cli. We need to call this before and after creating ec2 instance
func RunTerraform ¶
RunTerraform executes terraform apply function that creates the EC2 instances based on the .tf file provided returns a list of AWS node-IDs and node IPs
func SetCloudCredentials ¶
SetCloudCredentials sets AWS account credentials defined in .aws dir in user home dir
func SetElasticIPs ¶ added in v1.3.1
SetElasticIPs attach elastic IP(s) to the associated ec2 instance(s)
func SetKeyPair ¶
SetKeyPair define the key pair that we will create in our EC2 instance if it doesn't exist yet and download the .pem file to home dir
func SetOutput ¶
SetOutput adds output section in terraform state file so that we can call terraform output command and print instance_ip and instance_id to user
func SetSecurityGroup ¶
SetSecurityGroup whitelists the ip addresses allowed to ssh into cloud server
func SetSecurityGroupRule ¶
func SetupInstances ¶ added in v1.3.1
func SetupInstances(rootBody *hclwrite.Body, securityGroupName string, useExistingKeyPair bool, existingKeyPairName, ami string, numNodes uint32)
SetupInstances adds aws_instance section in terraform state file where we configure all the necessary components of the desired ec2 instance(s)
Types ¶
This section is empty.