7.7 Learn Terraform - Automated Testing with Terratest

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 พ.ย. 2021
  • Automated your IaC testing with Terratest. In this video, I use my ALB Terraform module to test my ALB for a 200 status code. it takes 214 seconds to init, apply, test, and destroy all resources in AWS!

ความคิดเห็น • 7

  • @marius-gabrielruse2883
    @marius-gabrielruse2883 ปีที่แล้ว +9

    i understand nothing

  • @stannylou1636
    @stannylou1636 ปีที่แล้ว

    Works pretty good so far justing getting my head around it.

  • @stannylou1636
    @stannylou1636 ปีที่แล้ว +1

    I have a clue and a Question why this over Terraform plan? Just wondering this look interesting especially with the auto destroy. Nice vid

    • @NimbusDevOps
      @NimbusDevOps  ปีที่แล้ว +2

      Mainly, you can test the output of applications outside of Terraform. Think of it almost like an integration test between the resources you provision, and the expected state of your resources. If you did a Terraform Plan on a load balancer in AWS, you would have no idea whether or not the application was serving the expected index.html page or returning the intended message/payload. Terraform would just say, "I built a load balancer. I did my part. It's up. I'm going home." But if the load balancer is up and there is something wrong with the web server configuration that returns a 200 response but also doesn't return the intended page (i.e. you get error.html with a 200 code instead of index.html). So it's just a nice way of extending the confirmation of desired state beyond the provisioning of resources into the desired config state. When I talked about triggers and CI/CD, this scenario would allow you to automate testing of CI if you have some basic app testing stuff.

    • @stannylou1636
      @stannylou1636 ปีที่แล้ว

      @@NimbusDevOps I’m learning thanks

    • @stannylou1636
      @stannylou1636 ปีที่แล้ว

      @@NimbusDevOps Thanks for your reply I'll try it and let you know my results.

    • @stannylou1636
      @stannylou1636 ปีที่แล้ว

      @@NimbusDevOps Also subscribed!!!!!