# User assigned managed identity

**URL:** <https://discuss.hashicorp.com/t/user-assigned-managed-identity/35668>\
**Category:** Azure\
**Created:** [February 14, 2022, 1:35pm UTC](https://discuss.hashicorp.com/t/user-assigned-managed-identity/35668 "2022-02-14T13:35:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ondrejmatula7](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/ondrejmatula7/32/25941_2.png) [@ondrejmatula7](https://discuss.hashicorp.com/u/ondrejmatula7)\
**Post date:** [February 14, 2022, 1:35pm UTC](https://discuss.hashicorp.com/t/user-assigned-managed-identity/35668/1 "2022-02-14T13:35:51Z")

</div>

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 ?
