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

Testable - Trustable

Testable - Trustable

In this workshop, I dive into testing strategies for codified infrastructure using HashiCorp Terraform and explains what to do and what to avoid.

This version of the presentation was given at TestCon Europe in September 2021.

---

Companion Code: github.com/ksatirli/testable-terraform

Kerim Satirli

September 07, 2021
Tweet

More Decks by Kerim Satirli

Other Decks in Technology

Transcript

  1. Testable / Trustable
    TestCon Europe 2021
    Kerim Satirli
    Sr. Developer Advocate
    He/him

    View full-size slide

  2. Source: <a href="https://twitter.com/WILLROP3R/status/1317200717803900928">twitter.com/WILLROP3R</a>.

    View full-size slide

  3. Will Roper
    @WILLROP3R
    At 70,000 ft, the view is as breathtaking as the harsh
    environment outside this @usairforce U-2 pressure suit.

    Thankful for this beautiful blue planet and all who defend
    it and its freedoms. #breathless

    Source: <a href="https://twitter.com/WILLROP3R/status/1317200717803900928">twitter.com/WILLROP3R</a>.

    View full-size slide

  4. Sr. Developer Advocate at HashiCorp
    he/him
    @ksatirli
    Kerim
    Satirli

    Find me on <a href="https://twitter.com/ksatirli">twitter.com/ksatirli</a>.

    View full-size slide

  5. What is
    Infrastructure as Code
    01 Introduction

    View full-size slide

  6. https://console.aws.amazon.com/

    View full-size slide

  7. https://console.aws.amazon.com/

    View full-size slide

  8. resource "ec2" "instance" {
    type = "t3.micro"
    iam_role = "consul_server"
    shutdown_behavior = "terminate"
    storage "root" {
    device = "/dev/xvda"
    encryption = true
    }
    }
    CODE EDITOR
    Infrastructure
    as Code

    View full-size slide

  9. service "http" "proxy" {
    listen_addr = "127.0.0.1:${var.port}"
    process "server" {
    command = ["./server"]
    }
    }
    variable "port" {
    type = number
    description = "Port for proxy service"
    default = 8080
    }
    CODE EDITOR
    HashiCorp
    Configuration
    Language

    View full-size slide

  10. Why should we
    codify Infrastructure?
    01 Introduction

    View full-size slide

  11. Infrastructure
    as Code
    ▪ executable documentation
    ▪ enables collaboration
    ▪ safe and predictable

    View full-size slide

  12. Infrastructure for
    Today’s Workshop
    01 Introduction

    View full-size slide

  13. Infrastructure
    Overview
    https://github.com/im2nguyen/rover

    View full-size slide

  14. Workshop
    02 Workshop

    View full-size slide