Skip to content

Angelszm/terraform-aws-demo

Repository files navigation

Terraforming-AWS-Services

CloudFormation or Terraform Terraform

✅ Cloud Support and other service support: Opensource, Support multi-clouds, e.g., Azure, GCP, and other services Jenkins, Kubernetes, etc.
✅ Module support: You can create a module to reuse the template.
✅ Command line: Terraform cli has simple syntax(terraform init)
✅ Language support: Support Hashicorp configuration
Ref from : Linkedin

Variables and Outputs

  • Input Variables
  • Local Values
  • Output Values

Terraform Data Types

  • Primiive (String, Number, Boolean)
  • Collection (List, Set, Map)
  • Structural (Tuple, Object)

AWS Resources

Basic Terraforming

  • S3 Website Hosting
  • Cloudfront Distribution
  • Route53
  • VPC
  • EC2
  • ECR Docker Image
  • ECS Cluster & Service {Fargate}
  • ECS Task Definition
  • Attach Load Balance to Fargate
  • SQS
  • IoT Automation
  • EKS
  • Taint Docker
$ terraform state list 
$ terraform state show -- 
$ terraform show

Postgres Setup on EC2

https://www.pedroalonso.net/blog/using-terraform-to-automate-the-deployment-of-postgresql-to-ec2

ECS

Terraform Notes:

Open-Source, Declarative and Cloud Agnostic
Idempotency & Consistent

Infrastructure Lifecycle

  • Reliability
  • Manageability
  • Sensibility

Terraform Lifecycle

  • code, init, plan, validate, apply, destroy
  • graph (For Visualizing Execution Plans) | terraform graph | dot -Tsvg ? graph.svg (Resource Graph)

Terraform Core and Plugins

  • Core : RPC (Remote Procedure calls) to communicate with Terraform Plugins
  • Plugins: expose an implemtation for a specific service or provisioner

HashiCorp Cloud Platform (Include Terraform as Part of Products)

Terraform Cloud can store state to support Terraform runs on local machines, it works even better as a remote run environment. It supports two main workflows for performing Terraform runs:

VCS-driven workflow
API-driven workflow

Learning : https://developer.hashicorp.com/terraform/tutorials/certification-associate-tutorials/variables https://www.techbeatly.com/hashicorp-certified-terraform-associate-learning-exam-tips/

Terraform Best Practices: https://www.terraform-best-practices.com/

For Exam https://www.youtube.com/watch?v=V4waklkBC38

About

Terraforming AWS Resources: ECS~Fargate, EKS, ECR, S3, Cloudfront, VPC, EC2, SQS etc (For Fun Only)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published