Hello people, im creating code but im being stucked… i need to create managed identity for my app service which i create… i want to use user assigned identity but when i want to build it in azure im receiving errors.
Here is my code of app service:
resource “azurerm_app_service” “testing_happy” {
name = “testingfine”
location = azurerm_resource_group.testgroup.location
resource_group_name = azurerm_resource_group.testgroup.name
app_service_plan_id = azurerm_app_service_plan.app_service_plan.id
site_config {
linux_fx_version = "DOTNETCORE|3.1"
}
identity {
type = "UserAssigned"
identity_ids = [data.azurerm_user_assigned_identity.ondraloginpolicy.id]
}
}
and here is my identity
resource “azurerm_user_assigned_identity” “some name” {
resource_group_name = azurerm_resource_group.testgroup.name
location = azurerm_resource_group.testgroup.location
name = “somename”
could you please tell me what i have wrong or i need to add ?