You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After switching to new terraform version 0.12.12 we experince some issues, specifically route53 module output seems to be working with errors, it complains about missing attribute, thought the resource created is obviously has name and fqdn attributes.
Terraform Version
0.12.12
Terraform Configuration Files
output"fqdn" {
description="List of created non-alias record FQDNs."value=aws_route53_record.record[*].fqdn
}
Error: Unsupported attribute
on ../../resource_modules/route53_record/outputs.tf line 3, in output "fqdn":
3: value = aws_route53_record.record[*].fqdn
This object does not have an attribute named "fqdn".
Additional Context
when use without .fqdn the output is expected
output"fqdn" {
description="List of created non-alias record FQDNs."value=aws_route53_record.record[*]
}
The issue is that you're using a splat operator to refer to try and get something out of a map, but splat has wrapped that map in a list. More details at #22476. The short answer is that if you were to modify your code to values(aws_route53_record.record)[*].fqdn it will work as you're expecting it to.
I suggest reading through the linked issue for more insight as to why this happens, and that the splat operator operates on lists, or it will wrap anything not a list into one, as a matter of convenience.
I'm going to lock this issue 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 similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
ghost
locked and limited conversation to collaborators
Mar 29, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
After switching to new terraform version 0.12.12 we experince some issues, specifically route53 module output seems to be working with errors, it complains about missing attribute, thought the resource created is obviously has
name
andfqdn
attributes.Terraform Version
Terraform Configuration Files
Expected Behavior
0.12.9
Actual Behavior
0.12.12
Additional Context
when use without .fqdn the output is expected
The text was updated successfully, but these errors were encountered: