Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug report-App service managed identity cannot have both system assigned and user assigned #2008

Open
1 task done
Najmi96 opened this issue Jun 12, 2024 · 0 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@Najmi96
Copy link

Najmi96 commented Jun 12, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Version of the module you are using

5.7.11

Rover Version

aztfmod/rover:1.4.6-2306.1405

Terraform Version

No response

AzureRM Provider Version

No response

Affected Resource(s)/Data Source(s)

azurerm_app_service

Terraform Configuration Files

app_services = {
  ptazsg-5testbackoptwb01 = {
    resource_group_key      = "PTAZSG-DEV-TEST-RG"
    name                    = "ptazsg-5testbackoptwb01"
    app_service_plan_key    = "ptazsg-5test-asp01"
    application_insight_key = "ptazsg-5test-appins"

    identity = {
      type         = "SystemAssigned, UserAssigned"
      identity_ids = "/subscriptions/2be5068f-e0ac-4d57-aedc-96bc9798a265/resourceGroups/PTAZSG-IAC-DEV-APP-MSI-RG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ptazsg-5level4-plms-msi"
    }

Current caf module for app service identity:

dynamic "identity" {
    for_each = try(var.identity, null) == null ? [] : [1]

    content {
      type         = var.identity.type
      identity_ids = lower(var.identity.type) == "userassigned" ? local.managed_identities : null
    }
  }

Expected Behaviour

Terraform should support both user assigned and system assigned for app service identity.

Actual Behaviour

If add both user and system assigned in app service identity, terraform will destroy and it will give error.

Steps to Reproduce

Create app service, then assign both user assigned and system assigned in app service identity using terraform.

Important Factoids

No response

References

No response

@Najmi96 Najmi96 added the bug Something isn't working label Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant