Using a terraform dynamic block in the aws_quicksight_refresh_schedule resource for refresh_on_day is throwing a value conversion error
An unexpected error was encountered trying to build a value. This is always an error in the provider. Please report the following to the provider developer:
│
│ Received unknown value, however the target type cannot handle unknown values. Use the corresponding `types` package type or a custom type that handles unknown values.
│
│ Path:
│ Target Type: []quicksight.refreshOnDayData
│ Suggested Type: basetypes.ListValue
my code –
schedule {
refresh_type = each.value.refresh.type
schedule_frequency {
interval = each.value.refresh.interval
time_of_the_day = each.value.refresh.time_of_day
timezone = each.value.refresh.timezone
dynamic "refresh_on_day" {
for_each = each.value.refresh.interval == "WEEKLY" || each.value.refresh.interval == "MONTHLY" ? [1] : []
content {
day_of_week = try(each.value.refresh.interval == "WEEKLY" ? each.value.refresh.refresh_on_day : null, null)
day_of_month = try(each.value.refresh.interval == "MONTHLY" ? each.value.refresh.refresh_on_day : null, null)
}
}
}
}
The error says that it is always an error in provider. I opened a ticket in their community forum but they say it might be a terraform issue and use boto client instead.
Trying to see if anyone encountered an issue like this and if so, any solutions or workaround for this?