Aws_quicksight_refresh_schedule terraform dynamic block issue for refresh_on_day inline block

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?

Hi @think_tank_77,

The error is coming from the provider, or more specifically the plugin-framework they use to interface with Terraform. This may be a problem with the resource schema or data handling, but the provider developers would need to sort that out. If it is an issue with the framework, the developers wold be better poised to file an issue with the necessary details to address the problem.

This topic was automatically closed 62 days after the last reply. New replies are no longer allowed.