{"id":6728,"date":"2020-02-04T10:31:34","date_gmt":"2020-02-04T10:31:34","guid":{"rendered":"https:\/\/ee.yelkdev.site\/?p=6728"},"modified":"2023-09-22T16:04:01","modified_gmt":"2023-09-22T15:04:01","slug":"testing-infrastructure-as-code-3-lessons-learnt","status":"publish","type":"post","link":"https:\/\/www.equalexperts.com\/blog\/our-thinking\/testing-infrastructure-as-code-3-lessons-learnt\/","title":{"rendered":"Testing Infrastructure as Code &#8211; 3 Lessons Learnt"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">In the last few weeks, I made a deep dive into Infrastructures as Code. I chose <\/span><b>AWS<\/b><span style=\"font-weight: 400;\"> and <\/span><b>Terraform<\/b><span style=\"font-weight: 400;\"> to write my provisioning scripts.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">It came naturally to me, as a software engineer, to write Terraform code. A lot of software design principles (like KISS, DRY or even SOLID to some extent) can be adapted to write quality IaC. The intention is to end up with small, decoupled modules, used as building blocks for provisioning environments. Still, I felt a bit uncomfortable without TDD or automated tests at all. Are automated IaC tests useful (besides improving my well-being)?<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Developers, DevOps, Software Engineers, we always verify if our code works as expected, even if not in an automated manner. In the case of Terraform, running <\/span><i><span style=\"font-weight: 400;\">terraform plan<\/span><\/i><span style=\"font-weight: 400;\"> (a command that creates an execution plan, but doesn&#8217;t deploy anything) checks the syntax and if all resources are correctly defined.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Manual functional testing involves logging into the management console and verifying all properties of the deployed resources, verifying access-control lists, connectivity tests, etc. This is time-consuming and cumbersome, but necessary.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Operability practices aim to support frequent deployments. This also means constant changes to the underlying infrastructure. In this case, manual testing of the IaC is inefficient and may not add as much value as expected. For this reason, I decided to take some time and test the automated testing tools for IaC. Below, I will talk about three valuable lessons I learned.<\/span><\/p>\n<h3><b>1. Testing modules with Terratest isn&#8217;t even close to unit testing.<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">The tool of choice for automated Terraform tests is <a href=\"https:\/\/terratest.gruntwork.io\/\">Gruntwork&#8217;s <\/a><\/span><a href=\"https:\/\/terratest.gruntwork.io\/\"><b>Terratest<\/b><\/a><span style=\"font-weight: 400;\">. It is a Golang framework, actively growing and gaining popularity.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In the beginning, it was tempting to think about module tests like there were unit tests. When you unit-test a function used in your application, you don&#8217;t need to run the application. The tests are short, simple, and examine a particular piece of code in isolation (also with input values that yield errors.) Correctness means that the output of the function under test is as expected. We care about broad test coverage.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Module testing in Terratest is different. You write an example infrastructure code using the module you want to verify. Terratest deploys the code and runs your tests against it. The tests should answer the question: &#8220;does the infrastructure actually work?&#8221; For example: if your module deploys a server with running application, you could send some traffic to it to verify if it responds as expected.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Examining resource&#8217;s properties (loaded from an API) is rarely practiced with Terratest. It can be useful when false-negative test results may introduce some kind of high risk. As a result module testing with Terratest is looks almost like end-to-end testing.<\/span><\/p>\n<h3><b>2. There are other tools to complement Terratest.<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Sometimes, end-to-end tests are not enough. For example, your private network accidentally has a route to the gateway. To confirm, that the private network is really private, it feels convenient to check if no routes in its routing table let public traffic.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">You could also picture a situation where the operation team lets the development teams create own resources. You may need to ensure that the implemented code follows security standards and compliance obligations. E.g all resources should be correctly tagged, all storage should be encrypted, some ports should never be open, etc.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In addition to Terratest, several other testing tools are more convenient to test specific resource properties. One of them is <\/span><a href=\"https:\/\/github.com\/eerkunt\/terraform-compliance\"><b>terraform-compliance<\/b><\/a><span style=\"font-weight: 400;\">. You can encode all your policies in &#8220;spec&#8221; files similar to Cucumber specs and run them against the output of <\/span><i><span style=\"font-weight: 400;\">terraform plan<\/span><\/i><span style=\"font-weight: 400;\">.\u00a0<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">\r\nFeature:<\/span><span style=\"font-weight: 400;\"> Define AWS Security Groups<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0In order to improve security<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0As engineers<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0We will use AWS Security Groups to control inbound traffic<\/span>\r\n\r\n<span style=\"font-weight: 400;\"> \u00a0<\/span><span style=\"font-weight: 400;\">Scenario:<\/span><span style=\"font-weight: 400;\"> Policy Structure<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0Given I have AWS Security Group <\/span><b>defined<\/b>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0Then it must contain ingress<\/span>\r\n\r\n<span style=\"font-weight: 400;\"> \u00a0<\/span><span style=\"font-weight: 400;\">Scenario:<\/span><span style=\"font-weight: 400;\"> Only selected ports should be publicly open<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0Given I have AWS Security Group <\/span><b>defined<\/b>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0When it contains ingress<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0Then it must only have tcp protocol <\/span><b>and<\/b><span style=\"font-weight: 400;\"> port <\/span><span style=\"font-weight: 400;\">22<\/span><span style=\"font-weight: 400;\">,<\/span><span style=\"font-weight: 400;\">443<\/span> <b>for<\/b> <span style=\"font-weight: 400;\">0<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">0<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">0<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">0<\/span><span style=\"font-weight: 400;\">\/<\/span><span style=\"font-weight: 400;\">0<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">This <\/span><i><span style=\"font-weight: 400;\">spec<\/span><\/i><span style=\"font-weight: 400;\"> would yield an error if any of your security groups allow inbound traffic on a port different than 22 or 443.<\/span><\/p>\n<img decoding=\"async\" class=\"alignnone wp-image-6731 size-full\" src=\"https:\/\/www.equalexperts.com\/wp-content\/uploads\/2020\/01\/screenshot_2019-10-04_at_09.42.03.png\" alt=\"\" width=\"800\" height=\"200\" srcset=\"https:\/\/www.equalexperts.com\/wp-content\/uploads\/2020\/01\/screenshot_2019-10-04_at_09.42.03.png 800w, https:\/\/www.equalexperts.com\/wp-content\/uploads\/2020\/01\/screenshot_2019-10-04_at_09.42.03-300x75.png 300w, https:\/\/www.equalexperts.com\/wp-content\/uploads\/2020\/01\/screenshot_2019-10-04_at_09.42.03-768x192.png 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\n<p><span style=\"font-weight: 400;\">If you feel more comfortable testing deployed resources, and you work with AWS, you could try <\/span><a href=\"https:\/\/github.com\/k1LoW\/awspec\"><b>AWSSpec<\/b><\/a><span style=\"font-weight: 400;\">. AWSSpec is built on top of Ruby&#8217;s RSpec testing framework. The tests are specs-alike, BDD style. The difference is that you run them against the real infrastructure. Similarly to the Terratest, if you would test modules you need to deploy examples first. You could automate the deployment and verification using Test-Kitchen (along with Kitchen-Terraform plugin). For example,\u00a0 testing a private subnet may look like this:<\/span><\/p>\n<pre><b>require<\/b> <span style=\"font-weight: 400;\">'spec_helper'<\/span>\r\n<span style=\"font-weight: 400;\">describe subnet(<\/span><span style=\"font-weight: 400;\">'Default Private Subnet'<\/span><span style=\"font-weight: 400;\">) <\/span><b>do<\/b>\r\n<span style=\"font-weight: 400;\"> \u00a0it { should exist }<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0its(<\/span><span style=\"font-weight: 400;\">:cidr_block<\/span><span style=\"font-weight: 400;\">) { should eq <\/span><span style=\"font-weight: 400;\">'10.10.2.0\/24'<\/span><span style=\"font-weight: 400;\"> }<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0its(<\/span><span style=\"font-weight: 400;\">:state<\/span><span style=\"font-weight: 400;\">) { should eq <\/span><span style=\"font-weight: 400;\">'available'<\/span><span style=\"font-weight: 400;\"> }<\/span>\r\n<b>end<\/b><\/pre>\n<pre><span style=\"font-weight: 400;\">describe route_table(<\/span><span style=\"font-weight: 400;\">'Private Subnet Route Table'<\/span><span style=\"font-weight: 400;\">) <\/span><b>do<\/b>\r\n<span style=\"font-weight: 400;\"> \u00a0it { should exist }<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0it { should have_subnet(<\/span><span style=\"font-weight: 400;\">'Default Private Subnet'<\/span><span style=\"font-weight: 400;\">) }<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0it { should have_route(<\/span><span style=\"font-weight: 400;\">'10.10.0.0\/16'<\/span><span style=\"font-weight: 400;\">).target(<\/span><span style=\"font-weight: 400;\">gateway:<\/span> <span style=\"font-weight: 400;\">'local'<\/span><span style=\"font-weight: 400;\">) }<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0it { should_not have_route(<\/span><span style=\"font-weight: 400;\">'0.0.0.0\/0'<\/span><span style=\"font-weight: 400;\">)}<\/span>\r\n<b>end<\/b><\/pre>\n<p><span style=\"font-weight: 400;\">Executing the test may show following output:<\/span><\/p>\n<img decoding=\"async\" class=\"alignnone wp-image-6732 size-full\" src=\"https:\/\/www.equalexperts.com\/wp-content\/uploads\/2020\/01\/screenshot_2019-10-06_at_22.30.49.png\" alt=\"\" width=\"800\" height=\"199\" srcset=\"https:\/\/www.equalexperts.com\/wp-content\/uploads\/2020\/01\/screenshot_2019-10-06_at_22.30.49.png 800w, https:\/\/www.equalexperts.com\/wp-content\/uploads\/2020\/01\/screenshot_2019-10-06_at_22.30.49-300x75.png 300w, https:\/\/www.equalexperts.com\/wp-content\/uploads\/2020\/01\/screenshot_2019-10-06_at_22.30.49-768x191.png 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\n<h3><b>3. Automated IaC tests are expensive<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">The cost of IaC testing doesn&#8217;t only include the charges for the resources deployed for testing. For writing automated IaC tests you need good programming skills, that may go beyond one programming language. (Terratest uses Golang, terraform-compliance uses Python, AWSSpec uses Ruby, etc.)<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Writing terraforms tests is time-consuming. The cloud APIs aren&#8217;t convenient to use, and helpers libraries may miss important functions. In the case of Terratest, and AWSSpec there is a lot of additional infrastructure code needed for module testing.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Many tools, although quite useful, aren&#8217;t yet mature. There is always a danger that they will cease to work with newer versions of Terraform or just be discontinued.<\/span><\/p>\n<h3><b>Summary<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Should I recommend investing time and money into automated IaC testing? That depends. First of all, your team should focus on using Terraform the right way. This means no direct, manual changes to the infrastructure.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Once delivering IaC works well, your team may consider adding automated tests.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">If a change may introduce any kind of risk that can&#8217;t be accepted, then it&#8217;s a good candidate for an automated test. Another factor to consider is the team topology. If the IaC ownership is decentralised then automated tests may help to ensure code consistency, compliance, and quality.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Is it OK to give up automated IaC testing for now? If you can&#8217;t introduce automated IaC testing you can rely on other confirmation techniques like green\/blue deployments with comprehensive monitoring. Although they do not substitute each other both can help verify the correctness of the infrastructure.<\/span><\/p>\n<blockquote><p>&nbsp;<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>I test automated testing tools for IaC and describe three valuable lessons I learned.<\/p>\n","protected":false},"author":115,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","inline_featured_image":false,"footnotes":""},"categories":[5],"tags":[28,32,30,33,29,31],"location":[397],"class_list":["post-6728","post","type-post","status-publish","format-standard","hentry","category-our-thinking","tag-aws","tag-awsspec","tag-iac","tag-operability","tag-terraform","tag-terratest"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Testing Infrastructure as Code - 3 Lessons Learnt | Equal Experts<\/title>\n<meta name=\"description\" content=\"I test automated testing tools for IaC and describe three valuable lessons I learned.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.equalexperts.com\/blog\/our-thinking\/testing-infrastructure-as-code-3-lessons-learnt\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Testing Infrastructure as Code - 3 Lessons Learnt\" \/>\n<meta property=\"og:description\" content=\"I test automated testing tools for IaC and describe three valuable lessons I learned.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.equalexperts.com\/blog\/our-thinking\/testing-infrastructure-as-code-3-lessons-learnt\/\" \/>\n<meta property=\"og:site_name\" content=\"Equal Experts\" \/>\n<meta property=\"article:published_time\" content=\"2020-02-04T10:31:34+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-09-22T15:04:01+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.equalexperts.com\/wp-content\/uploads\/2020\/04\/Testing-infrastructure-as-code-FB.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"620\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Katarzyna Kittel\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"Testing Infrastructure as Code - 3 Lessons Learnt\" \/>\n<meta name=\"twitter:description\" content=\"I test automated testing tools for IaC and describe three valuable lessons I learned.\" \/>\n<meta name=\"twitter:creator\" content=\"@EqualExperts\" \/>\n<meta name=\"twitter:site\" content=\"@EqualExperts\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Katarzyna Kittel\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.equalexperts.com\/blog\/our-thinking\/testing-infrastructure-as-code-3-lessons-learnt\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.equalexperts.com\/blog\/our-thinking\/testing-infrastructure-as-code-3-lessons-learnt\/\"},\"author\":{\"name\":\"Katarzyna Kittel\",\"@id\":\"https:\/\/www.equalexperts.com\/#\/schema\/person\/643e29fa92b543a9da62a2c5ffc990ed\"},\"headline\":\"Testing Infrastructure as Code &#8211; 3 Lessons Learnt\",\"datePublished\":\"2020-02-04T10:31:34+00:00\",\"dateModified\":\"2023-09-22T15:04:01+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.equalexperts.com\/blog\/our-thinking\/testing-infrastructure-as-code-3-lessons-learnt\/\"},\"wordCount\":979,\"publisher\":{\"@id\":\"https:\/\/www.equalexperts.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.equalexperts.com\/blog\/our-thinking\/testing-infrastructure-as-code-3-lessons-learnt\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.equalexperts.com\/wp-content\/uploads\/2020\/01\/screenshot_2019-10-04_at_09.42.03.png\",\"keywords\":[\"AWS\",\"AWSSpec\",\"IaC\",\"operability\",\"Terraform\",\"Terratest\"],\"articleSection\":[\"Our Thinking\"],\"inLanguage\":\"en-GB\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.equalexperts.com\/blog\/our-thinking\/testing-infrastructure-as-code-3-lessons-learnt\/\",\"url\":\"https:\/\/www.equalexperts.com\/blog\/our-thinking\/testing-infrastructure-as-code-3-lessons-learnt\/\",\"name\":\"Testing Infrastructure as Code - 3 Lessons Learnt | Equal Experts\",\"isPartOf\":{\"@id\":\"https:\/\/www.equalexperts.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.equalexperts.com\/blog\/our-thinking\/testing-infrastructure-as-code-3-lessons-learnt\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.equalexperts.com\/blog\/our-thinking\/testing-infrastructure-as-code-3-lessons-learnt\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.equalexperts.com\/wp-content\/uploads\/2020\/01\/screenshot_2019-10-04_at_09.42.03.png\",\"datePublished\":\"2020-02-04T10:31:34+00:00\",\"dateModified\":\"2023-09-22T15:04:01+00:00\",\"description\":\"I test automated testing tools for IaC and describe three valuable lessons I learned.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.equalexperts.com\/blog\/our-thinking\/testing-infrastructure-as-code-3-lessons-learnt\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.equalexperts.com\/blog\/our-thinking\/testing-infrastructure-as-code-3-lessons-learnt\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.equalexperts.com\/blog\/our-thinking\/testing-infrastructure-as-code-3-lessons-learnt\/#primaryimage\",\"url\":\"https:\/\/www.equalexperts.com\/wp-content\/uploads\/2020\/01\/screenshot_2019-10-04_at_09.42.03.png\",\"contentUrl\":\"https:\/\/www.equalexperts.com\/wp-content\/uploads\/2020\/01\/screenshot_2019-10-04_at_09.42.03.png\",\"width\":800,\"height\":200},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.equalexperts.com\/blog\/our-thinking\/testing-infrastructure-as-code-3-lessons-learnt\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.equalexperts.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Testing Infrastructure as Code &#8211; 3 Lessons Learnt\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.equalexperts.com\/#website\",\"url\":\"https:\/\/www.equalexperts.com\/\",\"name\":\"Equal Experts\",\"description\":\"Making Software. Better.\",\"publisher\":{\"@id\":\"https:\/\/www.equalexperts.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.equalexperts.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.equalexperts.com\/#organization\",\"name\":\"Equal Experts\",\"url\":\"https:\/\/www.equalexperts.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.equalexperts.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.equalexperts.com\/wp-content\/uploads\/2018\/08\/Equal_Experts_Logo_CMYK_Colour.jpg\",\"contentUrl\":\"https:\/\/www.equalexperts.com\/wp-content\/uploads\/2018\/08\/Equal_Experts_Logo_CMYK_Colour.jpg\",\"width\":719,\"height\":340,\"caption\":\"Equal Experts\"},\"image\":{\"@id\":\"https:\/\/www.equalexperts.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/EqualExperts\",\"https:\/\/www.linkedin.com\/company\/equal-experts\/?viewAsMember=true\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.equalexperts.com\/#\/schema\/person\/643e29fa92b543a9da62a2c5ffc990ed\",\"name\":\"Katarzyna Kittel\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.equalexperts.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5e96a64b9b2e49a64c4d0115eb2f897b4e8bce31e646fe870197d3f3e52c986d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5e96a64b9b2e49a64c4d0115eb2f897b4e8bce31e646fe870197d3f3e52c986d?s=96&d=mm&r=g\",\"caption\":\"Katarzyna Kittel\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Testing Infrastructure as Code - 3 Lessons Learnt | Equal Experts","description":"I test automated testing tools for IaC and describe three valuable lessons I learned.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.equalexperts.com\/blog\/our-thinking\/testing-infrastructure-as-code-3-lessons-learnt\/","og_locale":"en_GB","og_type":"article","og_title":"Testing Infrastructure as Code - 3 Lessons Learnt","og_description":"I test automated testing tools for IaC and describe three valuable lessons I learned.","og_url":"https:\/\/www.equalexperts.com\/blog\/our-thinking\/testing-infrastructure-as-code-3-lessons-learnt\/","og_site_name":"Equal Experts","article_published_time":"2020-02-04T10:31:34+00:00","article_modified_time":"2023-09-22T15:04:01+00:00","og_image":[{"width":1200,"height":620,"url":"https:\/\/www.equalexperts.com\/wp-content\/uploads\/2020\/04\/Testing-infrastructure-as-code-FB.jpg","type":"image\/jpeg"}],"author":"Katarzyna Kittel","twitter_card":"summary_large_image","twitter_title":"Testing Infrastructure as Code - 3 Lessons Learnt","twitter_description":"I test automated testing tools for IaC and describe three valuable lessons I learned.","twitter_creator":"@EqualExperts","twitter_site":"@EqualExperts","twitter_misc":{"Written by":"Katarzyna Kittel","Estimated reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.equalexperts.com\/blog\/our-thinking\/testing-infrastructure-as-code-3-lessons-learnt\/#article","isPartOf":{"@id":"https:\/\/www.equalexperts.com\/blog\/our-thinking\/testing-infrastructure-as-code-3-lessons-learnt\/"},"author":{"name":"Katarzyna Kittel","@id":"https:\/\/www.equalexperts.com\/#\/schema\/person\/643e29fa92b543a9da62a2c5ffc990ed"},"headline":"Testing Infrastructure as Code &#8211; 3 Lessons Learnt","datePublished":"2020-02-04T10:31:34+00:00","dateModified":"2023-09-22T15:04:01+00:00","mainEntityOfPage":{"@id":"https:\/\/www.equalexperts.com\/blog\/our-thinking\/testing-infrastructure-as-code-3-lessons-learnt\/"},"wordCount":979,"publisher":{"@id":"https:\/\/www.equalexperts.com\/#organization"},"image":{"@id":"https:\/\/www.equalexperts.com\/blog\/our-thinking\/testing-infrastructure-as-code-3-lessons-learnt\/#primaryimage"},"thumbnailUrl":"https:\/\/www.equalexperts.com\/wp-content\/uploads\/2020\/01\/screenshot_2019-10-04_at_09.42.03.png","keywords":["AWS","AWSSpec","IaC","operability","Terraform","Terratest"],"articleSection":["Our Thinking"],"inLanguage":"en-GB"},{"@type":"WebPage","@id":"https:\/\/www.equalexperts.com\/blog\/our-thinking\/testing-infrastructure-as-code-3-lessons-learnt\/","url":"https:\/\/www.equalexperts.com\/blog\/our-thinking\/testing-infrastructure-as-code-3-lessons-learnt\/","name":"Testing Infrastructure as Code - 3 Lessons Learnt | Equal Experts","isPartOf":{"@id":"https:\/\/www.equalexperts.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.equalexperts.com\/blog\/our-thinking\/testing-infrastructure-as-code-3-lessons-learnt\/#primaryimage"},"image":{"@id":"https:\/\/www.equalexperts.com\/blog\/our-thinking\/testing-infrastructure-as-code-3-lessons-learnt\/#primaryimage"},"thumbnailUrl":"https:\/\/www.equalexperts.com\/wp-content\/uploads\/2020\/01\/screenshot_2019-10-04_at_09.42.03.png","datePublished":"2020-02-04T10:31:34+00:00","dateModified":"2023-09-22T15:04:01+00:00","description":"I test automated testing tools for IaC and describe three valuable lessons I learned.","breadcrumb":{"@id":"https:\/\/www.equalexperts.com\/blog\/our-thinking\/testing-infrastructure-as-code-3-lessons-learnt\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.equalexperts.com\/blog\/our-thinking\/testing-infrastructure-as-code-3-lessons-learnt\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.equalexperts.com\/blog\/our-thinking\/testing-infrastructure-as-code-3-lessons-learnt\/#primaryimage","url":"https:\/\/www.equalexperts.com\/wp-content\/uploads\/2020\/01\/screenshot_2019-10-04_at_09.42.03.png","contentUrl":"https:\/\/www.equalexperts.com\/wp-content\/uploads\/2020\/01\/screenshot_2019-10-04_at_09.42.03.png","width":800,"height":200},{"@type":"BreadcrumbList","@id":"https:\/\/www.equalexperts.com\/blog\/our-thinking\/testing-infrastructure-as-code-3-lessons-learnt\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.equalexperts.com\/"},{"@type":"ListItem","position":2,"name":"Testing Infrastructure as Code &#8211; 3 Lessons Learnt"}]},{"@type":"WebSite","@id":"https:\/\/www.equalexperts.com\/#website","url":"https:\/\/www.equalexperts.com\/","name":"Equal Experts","description":"Making Software. Better.","publisher":{"@id":"https:\/\/www.equalexperts.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.equalexperts.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/www.equalexperts.com\/#organization","name":"Equal Experts","url":"https:\/\/www.equalexperts.com\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.equalexperts.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.equalexperts.com\/wp-content\/uploads\/2018\/08\/Equal_Experts_Logo_CMYK_Colour.jpg","contentUrl":"https:\/\/www.equalexperts.com\/wp-content\/uploads\/2018\/08\/Equal_Experts_Logo_CMYK_Colour.jpg","width":719,"height":340,"caption":"Equal Experts"},"image":{"@id":"https:\/\/www.equalexperts.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/EqualExperts","https:\/\/www.linkedin.com\/company\/equal-experts\/?viewAsMember=true"]},{"@type":"Person","@id":"https:\/\/www.equalexperts.com\/#\/schema\/person\/643e29fa92b543a9da62a2c5ffc990ed","name":"Katarzyna Kittel","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.equalexperts.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5e96a64b9b2e49a64c4d0115eb2f897b4e8bce31e646fe870197d3f3e52c986d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5e96a64b9b2e49a64c4d0115eb2f897b4e8bce31e646fe870197d3f3e52c986d?s=96&d=mm&r=g","caption":"Katarzyna Kittel"}}]}},"_links":{"self":[{"href":"https:\/\/www.equalexperts.com\/wp-json\/wp\/v2\/posts\/6728","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.equalexperts.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.equalexperts.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.equalexperts.com\/wp-json\/wp\/v2\/users\/115"}],"replies":[{"embeddable":true,"href":"https:\/\/www.equalexperts.com\/wp-json\/wp\/v2\/comments?post=6728"}],"version-history":[{"count":0,"href":"https:\/\/www.equalexperts.com\/wp-json\/wp\/v2\/posts\/6728\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.equalexperts.com\/wp-json\/wp\/v2\/media?parent=6728"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.equalexperts.com\/wp-json\/wp\/v2\/categories?post=6728"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.equalexperts.com\/wp-json\/wp\/v2\/tags?post=6728"},{"taxonomy":"location","embeddable":true,"href":"https:\/\/www.equalexperts.com\/wp-json\/wp\/v2\/location?post=6728"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}