Skip to content

jjanczyszyn/iac-with-terraform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Infrastructure as Code with Terraform

Note: based on An Introduction to Terraform

Prerequisites

  1. AWS account how to set it up
  2. AWS user with an access key and permission to create resources in EC2 how to set it up
  3. Installed aws-cli how to install
  4. Configured aws credentials aws configure

Quick start with Terraform

Note: This example deploys resources into your AWS account. They should fall under the AWS Free Tier but beware ;)

  1. Install Terraform. (If you're using brew try: brew install terraform)
  2. cd into terraform-demo folder.
  3. Create a vars.tf file based on vars.tf.example
  4. Run terraform plan.
  5. If the plan looks ok, run terraform apply.

Deploy hello world flask app with ansible

Note: Based on https://github.com/tuppa/flask

  1. pip install ansible
  2. cd into ansible folder.
  3. Create an inventory file called demo based on demo.example
  4. Execute ANSIBLE_SSH_PIPELINING=1 ansible-playbook -i demo demo.yml

ALL DONE! :) now you can open {public_ip from terraform output} in your browser and get a hello from your aws flask app running on your aws instance

alt tag

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages