Is it possible to get the default function key for an Azure Function development slot?

Is it possible to get the default function key for an Azure Function development slot?

I know that azurerm_function_app_host_keys is able to return the default_function_key. However, this requires the name of the Function App as an argument and does not allow to specify the slot.

I tried specifying the slot in the name of the Function App, as listed below,

  • name-of-function/slot-name
  • name-of-function-slot-name
  • slot-name

but this would result in the following error:
Error: Error: AzureRM Function App "name-of-function/slot-name" (Resource Group "rg-name") was not found

Any help would be appreciated!

a bit late but maybe helpful for someone else, struggling with this issue…

  • {name-of-function-app}/slots/{slot-name}

Cheers
Martin