• Terraform Weekly
  • Posts
  • weekly.tf - Issue #89 - Custom condition checks, depends_on with modules, Proper scoping of Terraform modules, Postconditions

weekly.tf - Issue #89 - Custom condition checks, depends_on with modules, Proper scoping of Terraform modules, Postconditions

Hi πŸ‘‹

Recently, there have been some issues with newsletter delivery.

Therefore, I ask you (dear subscriber) to move this email into the Priority tab in Gmail or your mail app's equivalent. In Gmail, you'll have to make sure to confirm the follow-up message if the setting should be saved for future emails.

Also, please add [email protected] to the contacts. Emails from contacts are handled differently and better.

Hopefully, it helps with future email deliveries! πŸ™

Bill Mfundo presents a perspective on custom condition checks as a design by contracts approach for writing Terraform modules. AB: Unfortunately, the inability to reference other resources' attributes and variables in various places in conditions significantly limits such implementation.

πŸ™Œ News from the sponsor πŸ™Œ

Daniel Jimenez Garcia wrote a great article about using depends_on meta-argument in Terraform modules and various corner cases. AB: Read this post if you see data... will be read during apply in your terraform plan.

Haris Khan wrote a post pointing out the importance of proper scoping of the Terraform Modules as a requirement to work around several limitations of Terraform (e.g. variables in lifecycles, module dependencies, catch-22).

An overview of tools and approaches by Ana Jovanovska. AB: I prefer Pulumi if I suddenly have to choose between CDK for Terraform or Pulumi.

Jamie Phillips shows a way to use postcondition blocks in Terraform to verify the HTTP response code from an API request. One can also use this jsonschema_validator to do a more thorough check of JSON.

Open-source projects

Pike is a tool for determining the permissions or policies required for IAC code. AB: Great work by James Woolfenden! πŸ‘πŸ”₯

Open source tool to handle remote terraform workspace in organizations and handle all the lifecycle (plan, apply, destroy).

πŸ”΄ Terraform Serverless Patterns - September 2

Feedback ❀️

If you have any feedback you want to share with me, please do so via Twitter, LinkedIn, or just reply to the email.

Remember that sharing is caring, so it will help the Terraform community (and me) if you share this newsletter with your friends and colleagues.

PS: One of the best ways to help Ukraine - https://palianytsia.com.ua/

Glory to Ukraine! πŸ‡ΊπŸ‡¦