terraform-azurerm-caf
terraform-azurerm-caf copied to clipboard
Bug report- TXT records seem broken
Is there an existing issue for this?
- [X] I have searched the existing issues
Community Note
- Please vote on this issue by adding a :thumbsup: reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Version of the module you are using
5.7.14
Rover Version
aztfmod/rover:1.4.6-2305.1807
Terraform Version
v1.4.6 on linux_arm64
AzureRM Provider Version
3.75.0
Affected Resource(s)/Data Source(s)
azurerm_dns_txt_record" "txt"
Terraform Configuration Files
dns_zone_records = {
frontdoor = {
dns_zone = {
key = "public_dns"
}
records = {
txt = { //comment after successfull validation
foobar = {
name = "foobar"
records = {
text1 = "MS=ms10101010"
}
}
}
}
}
}
Expected Behaviour
Create an TXT record with the value of MS=ms10101010
Actual Behaviour
The txt record expects an unspecified data structure containing a value.value expression:
resource "azurerm_dns_txt_record" "txt" {
for_each = try(var.records.txt, {})
name = each.value.name
zone_name = var.zone_name
resource_group_name = var.resource_group_name
ttl = try(each.value.ttl, 300)
tags = merge(var.base_tags, try(each.value.tags, {}))
dynamic "record" {
for_each = each.value.records
content {
value = record.value.value <--
}
}
}
I propose to document the required data structure. I was not able to figure out a working variable, so i will propose a PR to change the expression to work with my configuration.
content {
value = record.value <--
}
Steps to Reproduce
No response
Important Factoids
No response
References
No response