Azure Front Door multiple endpoints in list

Currently, we are using a variables file for configure our Azure Front Door resource. We are also deploying an Azure Key Vault resource. Our Key Vault config uses an outputs.tf so that the Front Door config can pick up those variables and utilize them (key vault certificate secret name, key vault certificate current version, key vault id).

We are wanting to switch up the config and use a dynamic block with a for_each set to a variable of type = list(map(string)) and configure our front door frontendpoints.

Is there anyway to use variables inside of another variable in the list? Or what would be the best way to deploy multiple frontend endpoints dynamically with a list?

1 Like

To use variables within another variable in a list, you can leverage for_each in combination with dynamic blocks. You can define a list of maps for your frontend endpoints and then iterate over them. This allows you to dynamically create multiple frontend endpoints based on the list. Just ensure your variable structure is correct, and you should be good to go!

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