Create one or more AWS EC2 spot price instance.
- Choose whether or not to include an additional volume (EBS)
- Use your own SSH key
- Update your Route53 Hosted zone with the EC2 instances created
- Expose ports
22,80and25565(Minecraft) for ingress traffic - Enable all egress traffic
- A S3 bucket and DynamoDB for Terraform state
- A pre-made SSH key
- Hosted Zone ID
- An idea about price, AMI, instance type and spot price you are willing to pay
These variables can either be defined as environmental variables, or added to a .tfvars file:
ec2_instance_settings, please have a look at ./variables.tf for what is necessarypublic_key, namely thekey_nameandpublic_keyinformationzone_idwhich is your Hosted Zone ID from Route53
Note! You may need to also change
regionand/oravailability_zone, depending on your preference and geographic location.
terraform init -reconfigure -backend-config="dynamodb_table=${TERRAFORM_STATE_DYNAMODB_TABLE}" -backend-config="bucket=${TERRAFORM_STATE_AWS_BUCKET}"terraform plan -var-file filename.tfvarsterraform apply -var-file filename.tfvarsOmit the
-var-file filename.tfvarspart if everything is defined using environmental variables.
Play some Minecraft, or have some other fun :)