Provision similar infrastructure components by iterating over a data structure with the for_each argument. Duplicate an entire VPC including a load balancer and multiple EC2 instances for each project defined in a map.| Manage similar resources with for each | Terraform | HashiCorp Developer
In the cold of December we have but one thing to keep us warm: our laptops, trying to solve Advent of Code puzzles with inefficient algorithms. This year, 2024, is the tenth edition, and the puzzles are filled with more Easter eggs than ever before. Unfortunately, I’m not interested in Easter eggs, or solving the puzzles. I am a DevOps engineer, and I’m going to apply Infrastructure as Code principles to Advent of Code.| bertptrs.nl
The templatefile function reads the file at the given path and renders its content as a template.| templatefile - Functions - Configuration Language | Terraform | HashiCorp Dev...
Check custom requirements for variables, outputs, data sources, and resources and provide better error messages in context.| Custom Conditions - Configuration Language | Terraform | HashiCorp Developer
Reference values in configurations, including resources, input variables, local and block-local values, module outputs, data sources, and workspace data.| References to Values - Configuration Language | Terraform | HashiCorp Developer
Dynamic blocks automatically construct multi-level, nested block structures. Learn to configure dynamic blocks and understand their behavior.| Dynamic Blocks - Configuration Language | Terraform | HashiCorp Developer
For expressions transform complex input values into complex output values. Learn how to filter inputs and how to group results.| For Expressions - Configuration Language | Terraform | HashiCorp Developer
Recently, I was creating a terraform module that creates an S3 bucket. An S3 bucket can only have one aws_s3_bucket_policy, and the module needed to include a default policy to force TLS v1.2. I also needed to be able to pass additional policy statements to the module which may or may not include a condition. Unfortunately, there is not an obvious way to include the condition only when it is part of the policy. This post shows how you can include a nested dynamic condition block when the bloc...| blue42.net