- Clone this repo (where project1 is your project name):
git clone git@github.com:danf425/terraform_skeleton.git project1cd project1
- Change all instances of PROJECTNAME TO your own project name:
find ./ -type f -exec sed -i '' -e 's/PROJECTNAME/project1/g' {} \;
- Change Project_Name to what you want to name the instance:
find ./ -type f -exec sed -i '' -e 's/Project_Name/project_1/g' {} \;
- Change projectname.tf name to match Project_Name above:
mv terraform/aws/projectname.tf terraform/aws/project1.tf
- If you are using Okta: -
okta_aws solutions-architects - Move to terraform/aws:
cd terraform/aws
- Initialize terraform:
terraform init
- Validate:
terraform validate
- Spin up instance:
terraform apply
- SSH into your instance
ssh -i ~/.ssh/dmontanez-aws centos@YOURPUBLICIP
- Destroy (if you want):
terraform destroy
Find how to use pre-made templates here: https://github.com/danf425/terraform_skeleton/tree/master/terraform/templates
Made:
- Chef Automate
- Jenkins (In process)