Documentation
¶
Index ¶
- func CheckIsInstalled() error
- func GetInstanceID(terraformDir string) (string, error)
- func GetPublicIP(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 SetElasticIP(rootBody *hclwrite.Body)
- 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 SetupInstance(rootBody *hclwrite.Body, securityGroupName string, useExistingKeyPair bool, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckIsInstalled ¶
func CheckIsInstalled() error
func GetInstanceID ¶
func GetPublicIP ¶
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 the AWS node-ID and node IP
func SetCloudCredentials ¶
SetCloudCredentials sets AWS account credentials defined in .aws dir in user home dir
func SetElasticIP ¶
SetElasticIP attach elastic IP to our ec2 instance
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 ¶
Types ¶
This section is empty.