Hi Duncan,
Thank you for your response. That is also the direction I am thinking of. To work with Terraform resources I will implement an external data source to fetch the column names and types. Determining the output columns and types of a query however, requires running the query fully so you are billed for the query cost every time you run terraform apply. Therefore I think I will add the custom SQL first a veiw to Athena and fetch the column names and types from the schema (which should be free).
Kind regards
Nelis