---
title: "Comment by Rishabh Mishra on \"Your Terraform IaC Module Should Say No Before Your Cloud Bill Does: Cloud High Availability for $0(Part 2 - IaC Implementation)\" | Hashnode"
description: "Failing at plan time is the right place for this, since a bill is the worst way to learn a limit was crossed. Keeping each limit in locals.tf with its own error"
url: "https://hashnode.com/posts/your-terraform-iac-module-should-say-no-before-your-cloud-bill-does-cloud-high-availability-for-0-part-2-iac-implementation/6afde0eda17ccabfdb460307/comment/6afe6684f8f11c4872ffa282"
---

[Discussion](https://hashnode.com/posts/your-terraform-iac-module-should-say-no-before-your-cloud-bill-does-cloud-high-availability-for-0-part-2-iac-implementation/6afde0eda17ccabfdb460307)

Comment [Your Terraform IaC Module Should Say No Before Your Cloud Bill Does: Cloud High Availability for $0(Part 2 - IaC Implementation)](https://hashnode.com/posts/your-terraform-iac-module-should-say-no-before-your-cloud-bill-does-cloud-high-availability-for-0-part-2-iac-implementation/6afde0eda17ccabfdb460307)

[Rishabh Mishra](https://hashnode.com/@rushdeploy)

[3d ago](https://hashnode.com/posts/your-terraform-iac-module-should-say-no-before-your-cloud-bill-does-cloud-high-availability-for-0-part-2-iac-implementation/6afde0eda17ccabfdb460307/comment/6afe6684f8f11c4872ffa282)

Failing at plan time is the right place for this, since a bill is the worst way to learn a limit was crossed. Keeping each limit in locals.tf with its own error message is the part I would copy first, as it makes the failure easy to fix. The private-by-default setup with Bastion is also a good call for a free-tier project.

[Merlin Saha](https://hashnode.com/@sahamerlin)

[3d ago](https://hashnode.com/posts/your-terraform-iac-module-should-say-no-before-your-cloud-bill-does-cloud-high-availability-for-0-part-2-iac-implementation/6afde0eda17ccabfdb460307/comment/6afe6684f8f11c4872ffa282#reply-6afe7be48d7f0f6306fb3b40)

Thanks Rishabh, Glad that part was useful to you. The good news is that the precondition pattern isn’t tied to OCI, it works with any cloud provider Terraform supports. Curious: are you running something on OCI Always Free today, or would you apply this pattern to another provider’s free tier?

[Rishabh Mishra](https://hashnode.com/@rushdeploy)

[3d ago](https://hashnode.com/posts/your-terraform-iac-module-should-say-no-before-your-cloud-bill-does-cloud-high-availability-for-0-part-2-iac-implementation/6afde0eda17ccabfdb460307/comment/6afe6684f8f11c4872ffa282#reply-6afebaa154118fd541b14f01)

Not on OCI at the moment — I'd apply the same pattern to whichever free tier a small project sits on, since the guardrail idea travels well. The per-limit error message is the part that makes it portable, so a failure still tells you exactly which cap to fix.

[Merlin Saha](https://hashnode.com/@sahamerlin)

[3d ago](https://hashnode.com/posts/your-terraform-iac-module-should-say-no-before-your-cloud-bill-does-cloud-high-availability-for-0-part-2-iac-implementation/6afde0eda17ccabfdb460307/comment/6afe6684f8f11c4872ffa282#reply-6aff1fa2c2cbe8a06875477e)

Nice, exactly! Let's aim for a cloud-agnostic pattern that can be applied across different cloud free tiers. That's exactly what I love about multi-cloud with Terraform and IaC: building reusable patterns that aren't tied to a single cloud provider.

[Rishabh Mishra](https://hashnode.com/@rushdeploy)

[2d ago](https://hashnode.com/posts/your-terraform-iac-module-should-say-no-before-your-cloud-bill-does-cloud-high-availability-for-0-part-2-iac-implementation/6afde0eda17ccabfdb460307/comment/6afe6684f8f11c4872ffa282#reply-6b000b90d6ec62877fd7f6cb)

Agreed, that is the part worth keeping portable. I would keep the limits in one shared locals file, with each provider supplying only its own caps and error text. That way the same guardrail can move between free tiers without rewriting the checks.

[Merlin Saha](https://hashnode.com/@sahamerlin)

[2d ago](https://hashnode.com/posts/your-terraform-iac-module-should-say-no-before-your-cloud-bill-does-cloud-high-availability-for-0-part-2-iac-implementation/6afde0eda17ccabfdb460307/comment/6afe6684f8f11c4872ffa282#reply-6b005d0872c431734a44bf03)

Cool, using a shared file is a great approach, especially when you need to reuse the same logic across multiple providers or different environment for the same csp. Let's move forward.
