Skip to content

This has small snippets of different terraform templates that could be helpful on projects.

Notifications You must be signed in to change notification settings

kungfuai/terraform_gists

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Spinning Up an Evaluation Instance

To get started, make sure you have Terraform and AWS CLI installed. If you don't, please navigate to https://learn.hashicorp.com/tutorials/terraform/install-cli to get Terraform installed and to https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html to get AWS CLI installed.

Log into Your AWS Account with the CLI

The first thing to do is to ensure that you are logged into your account. Run:

aws configure

to get started. Enter your Access Key ID, Secret Key and us-west-2 for the default region.

Creating the Bucket to Manage Terraform State

Then, run the command

ec2_instances/bin/create_backend_store.sh

to create the backend store bucket for the Terraform scripts in S3 in your AWS Account. You only need to run this command the very first time you run Terraform - if the bucket already exists (this Terraform script has run once), then you can skip this step.

Provisioning Resources with Terraform

Next, you just run the Terraform commands:

cd ec2_instances/infrastructure && terraform init

to initialize the Terraform scripts. Once that finishes, you can run

terraform plan

to plan out the deployment and finally

terraform apply -auto-approve

to apply the deployment plan.

Once you've deployed your resources, you can navigate to the console (specifically EC2 in this case) to check on them. If the apply worked, you should see the resources in the Management Console.

Connecting to the Evaluation Instance

Finally, to log in to your EC2 instance, make sure that you have the private key and public key for the EC2 instance saved somewhere. Make sure that the private key NEVER leaves your computer. Once you have the keys, you can run

ssh -i "Allix5EvaluationKey.pem" [email protected]

to log into the EC2 instance.

Contact

Please reach out to [email protected] for help.

About

This has small snippets of different terraform templates that could be helpful on projects.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published