Understanding the AWS Provider for Terraform

Kerim Satirli (He/Him) Developer Advocate at HashiCorp

@ksatirli on GitHub and Twitter

Infrastructure as Code

  • executable documentation
  • enables collaboration
  • safe and predictable

Terraform

  • 125+ Official Providers (AWS, GCP, Docker, etc.)
  • 175+ Community Providers (1Password, Stripe, Unifi, etc.)

Variable Definition Files

  • contain key-value definitions of variables
  • automatically loaded if named:
    • “terraform.tfvars” or “terraform.tfvars.json”
    • “.auto.tfvars” or “.auto.tfvars.json”

Managing AWS with Terraform

AWS Provider for Terraform (ChangeLog

Terraform lifecycle

  • terraform init
  • terraform fmt
  • terraform validate
  • terraform plan -out="terraform.tfplan"
  • terraform apply "terraform.tfplan"
  • terraform plan -destroy

Scaling Terraform

Review

  • Providers
  • Lifecycle
  • State

Materials:

  • slides: hashi.co/tf-basics-for-aws
  • code: hashi.co/tf-basics-for-aws-code
  • guides: hashi.co/tf-learn-aws
  • forums: hashi.co/tf-forum-aws

HashiConf Digital:

  • June 22 - 24, 2020
  • online
  • free registration

Thank You