Quick question regarding a small observation I made right now.
In one of my function_apps I have something similar to the following
resource "azurerm_function_app" "funky" {
app_settings = {
"MY_SETTING" = true
}
}
Note the type of the parameter to the right of map is boolean. If I understand correctly, application settings in Azure are all strings, and the above terraform results in the string “true” being used as the setting value.
I don’t see any definition in the documentation of how the types are coerced, is this some happy accident that can be relied on in future iterations or should I change my code to the following (assuming that I want to configure this with a variable)?
resource "azurerm_function_app" "funky" {
app_settings = {
"MY_SETTING" = var.enable_my_setting ? "true" : "nope"
}
}
For a little extra context my (kotlin) app reads the setting as the following, so is dependant upon the string being “true” (sure I could make this more robust but the question stands no matter what).
private val allowDestructiveProcess = System.getenv("MY_SETTING") == "true"