Aaccording to Terraform documentation I am trying to calculate a max. start date in Terraform, which has to be the first day of the month within the next 12 monthes.
I found this post which let me start to implement it like the following example:
locals {
current_time = timestamp()
today = formatdate("YYYY-MM-DD", local.current_time)
max_start_date = formatdate("YYYY-MM-DD", timeadd(local.today, "8640h")) # max. 360 days
...
But now I'm lost. I need to create the maximum start date which has to be the first day of the month within a 12 month time range ...
Any Ideas how to solve this?