---
title: "Comment by Thu Kha Kyawe on \"Day 13: Conditional Expressions & Logic\" | Hashnode"
description: "Thank you! I see there is minor error. Add the following EIP resource to your main.tf file, preferably before the NAT Gateway resource: Elastic IPs for NAT Gate"
url: "https://hashnode.com/posts/day-13-conditional-expressions-and-logic/68f62b55d1b342e5bc20e581/comment/68f8f1f68cbc7835c7541ef4"
---

[Discussion](https://hashnode.com/posts/day-13-conditional-expressions-and-logic/68f62b55d1b342e5bc20e581)

Comment [Day 13: Conditional Expressions & Logic](https://hashnode.com/posts/day-13-conditional-expressions-and-logic/68f62b55d1b342e5bc20e581)

[Thu Kha Kyawe](https://hashnode.com/@thukhakyawe)

[Oct 22, 2025](https://hashnode.com/posts/day-13-conditional-expressions-and-logic/68f62b55d1b342e5bc20e581/comment/68f8f1f68cbc7835c7541ef4)

Thank you! I see there is minor error.

Add the following EIP resource to your main.tf file, preferably before the NAT Gateway resource:

# Elastic IPs for NAT Gateways (conditional)

resource "aws\_eip" "nat" { count = local.create\_nat\_gateway ? local.az\_count : 0 domain = "vpc"

tags = { Name = "${var.project\_name}-${var.environment}-nat-eip-${count.index + 1}" } }

[StackOps - Diary](https://hashnode.com/@stackops97)

[Oct 22, 2025](https://hashnode.com/posts/day-13-conditional-expressions-and-logic/68f62b55d1b342e5bc20e581/comment/68f8f1f68cbc7835c7541ef4#reply-68f9030a19e954364288b3db)

Yes, you’re correct. I don’t know how I missed the EIP block. I really appreciate you pointing that out! 🫡
