Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Terraform Webinar

Terraform Webinar

These are the slides from my Terraform webinar held in April 2020

Thorsten Hans

April 15, 2020
Tweet

More Decks by Thorsten Hans

Other Decks in Technology

Transcript

  1. Talking Points Terraform and Infrastructure as Code Introduction Terraforming Microsoft

    Azure Continuous Integration with GitHub Actions Terraform Resources
  2. by HashiCorp • Toolset for Infrastructure as Code • Written

    in Go • Available for Windows, Linux, macOS, FreeBSD, OpenBSD, Solaris • Open Source • Optional paid services • Terraform Cloud (adds collaboration features) • Terraform Enterprise (adds governance features) Terraform
  3. Terraform Write, Plan, and Create 1 Infrastructure as Code 2

    Preview Changes before applying 3 Build reproducible infrastructure
  4. Terraform Write, Plan, and Create 1 Infrastructure as Code 2

    Preview Changes before applying 3 Build reproducible infrastructure
  5. Infrastructure as Code • Automate your Infrastructure • Can be

    stored in a version control system (git) • Change History / Change Tracking • Collaboration • Better documentation • Eliminates the Truck Factor (or Single Point of Failure) • Predictable deployments Terraform - Write
  6. Terraform Write, Plan, and Create 1 Infrastructure as Code 2

    Preview Changes before applying 3 Build reproducible infrastructure
  7. Preview changes before applying • Execution plan tells you which

    parts of the environment will be • Created • Modified • Deleted • Displayed / Verified before modifying the targeting infrastructure • Think of git status Terraform - Plan
  8. Terraform Write, Plan, and Create 1 Infrastructure as Code 2

    Preview Changes before applying 3 Build reproducible infrastructure
  9. Build reproducible infrastructure • One Terraform script can be applied

    million times • Configurable environments • Variables • Interpolation • Built-in functions Terraform - Create
  10. HashiCorp Configuration Language • Declarative language used to code your

    infrastructure • Based on JSON but more focused • Simple but powerful type system • Strings, Numbers, Booleans, Maps, Lists • One language for all infrastructure vendors • Using dedicated Providers Meet the HCL
  11. Talking Points Terraform and Infrastructure as Code Introduction Terraforming Microsoft

    Azure Continuous Integration with GitHub Actions Terraform Resources
  12. The AzureRM Provider • Terraform Provider supports all ARM API

    Features • Different Authentication patterns supported • Reuse Azure CLI Authentication • Dedicated Service Principal • Dedicated Managed Service Identity • Read/Write Azure Resources Terraforming Microsoft Azure
  13. Talking Points Terraform and Infrastructure as Code Introduction Terraforming Microsoft

    Azure Continuous Integration with GitHub Actions Terraform Resources
  14. Terraform in GitHub Actions • Use official Actions provided by

    HashiCorp • hashicorp/terraform-github-actions@master • Use GitHub’s Repository Secrets to establish context • Display output from various Actions such as • Format • Validate • Plan Continuous Integration
  15. Talking Points Terraform and Infrastructure as Code Introduction Terraforming Microsoft

    Azure Continuous Integration with GitHub Actions Terraform Resources
  16. Essential Features • Modules • https://thns.io/2R73oIQ • Workspaces • https://thns.io/2OZMs4Y

    • Terraform State • https://thns.io/2AftGS2 • Backends • https://thns.io/2DFyNOy Terraform Resources
  17. Great free and paid resources • Terraform Guide for Azure

    enthusiasts • https://thns.io/terraform-guide • Terraform Best Practices • https://thns.io/2P0mb6z • Book: Terraform: Up and Running • https://thns.io/2QdJSNz Terraform Resources