I'm really new to Terragrunt.
I was wondering if there is a way to dynamically generate the content of a file?
For example, consider the following piece of code:
generate "provider" {
path = "provider.tf"
if_exists = "overwrite"
contents = <<EOF
terraform {
required_providers {
azurerm = {
source = "azurerm"
version = "=2.49.0"
}
}
}
provider "azurerm" {
features {}
subscription_id = "xxxxxxxxxxxxxxxxx"
}
EOF
}
Is there a way to set values such as subscription_id
dynamically? I've tried using something like ${local.providers.subscription_id}
but it doesn't work:
provider "azurerm" {
features {}
subscription_id = "${local.providers.subscription_id}"
}