Terraform projetct to install a CrateDB on Amazon EC2 Instaces
Required software:
- AWS CLI
- Terraform
AWS credentials configured properly (https://www.terraform.io/docs/providers/aws/index.html)
Set AWS account ID as environment variable:
export AWS_ACCOUNT_ID="111111111"
To create remote storage use the following command:
chmod u+x ./startup
./startup
To Change the AWS Region edit the file listed on ./dynamodb/terraform.tfvars
Put your account keys on environment variables:
export TF_VAR_AWS_ACCESS_KEY_ID="anaccesskey"
export TF_VAR_AWS_SECRET_ACCESS_KEY="asecretkey"
Got ec2 folder and execute init command
cd ec2
terraform init
To Plan and review the changes made in the Cluster:
terraform plan -out "planfile"
Review the Plan of Execution BEFORE executing it
To execute the changes:
terraform apply -input=false "planfile"
To Change the settings edit the file listed on ./ec2/terraform.tfvars
To Change the settings edit the file listed on ./ec2/terraform.tfvars
To Plan and review the changes made in the Cluster:
terraform plan -out "planfile"
Review the Plan of Execution BEFORE executing it
To execute the changes:
terraform apply -input=false "planfile"