Skip to content

Conversation

@aramos-katalon
Copy link
Contributor

Description

Recently using this module for a full_name attribute configuration I faced this issue

  ╷
  │ Error: Invalid template interpolation value
  │ 
  │   on main.tf line 179, in resource "aws_route53_record" "this":
  │  179:   name                             = coalesce(each.value.full_name, "${each.value.name}.${local.zone_name}", "${each.key}.${local.zone_name}")
  │     ├────────────────
  │     │ each.value.name is null
  │ 
  │ The expression result is null. Cannot include a null value in a string
  │ template.
  ╵

Motivation and Context

Add a try in the second value os the coalesce func does expect to have an attribute name

Breaking Changes

Does not affect any previous configuration

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

@aramos-katalon
Copy link
Contributor Author

pre-commit run -a

@bryantbiggs bryantbiggs changed the title [FIX] Record is looking for attribute name in coalesce for records fix: Catch error and fall back when records.name is not provided Sep 24, 2025
@bryantbiggs bryantbiggs merged commit 6391f1b into terraform-aws-modules:master Sep 25, 2025
9 checks passed
antonbabenko pushed a commit that referenced this pull request Sep 25, 2025
## [6.0.2](v6.0.1...v6.0.2) (2025-09-25)

### Bug Fixes

* Catch error and fall back when `records.name` is not provided ([#127](#127)) ([6391f1b](6391f1b))
@antonbabenko
Copy link
Member

This PR is included in version 6.0.2 🎉

@aramos-katalon
Copy link
Contributor Author

aramos-katalon commented Oct 5, 2025

Thanks @antonbabenko @bryantbiggs , I'm sorry if I missed any steps that might help with verification. If there's documentation on how to do this, I'd be happy to read it and help in the future. At Katalon, we make extensive use of these modules and have occasionally customized some modules that might be useful for the codebase. We're also working on Bedrock internal modules, which might be of interest. Thank you very much for all the effort!

@aramos-katalon aramos-katalon deleted the patch-1 branch October 5, 2025 02:31
@github-actions
Copy link

github-actions bot commented Nov 5, 2025

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants