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

RecoveryServicesVault with both UserAssigned and System Assigned identity not working #24933

Closed
1 task done
XristophD opened this issue Feb 19, 2024 · 1 comment · Fixed by #24978
Closed
1 task done

Comments

@XristophD
Copy link

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 and review the contribution guide to help.

Terraform Version

1.7.3

AzureRM Provider Version

3.92.0

Affected Resource(s)/Data Source(s)

azurerm_recovery_services_vault

Terraform Configuration Files

resource "azurerm_recovery_services_vault" "this" {
  name                          = "rsv-inf-test1-weu-01"
  resource_group_name           = "rg-name-01"
  location                      = "westeurope"
  sku                           = "Standard"
  soft_delete_enabled           = false 
  cross_region_restore_enabled  = false 

  identity {
    type         = "SystemAssigned, UserAssigned"
    identity_ids = [module.rsv_usami.id] # ID of some existing user assigned identity
  }
}

Debug Output/Panic Output

2024-02-19T16:58:25.944Z [DEBUG] provider.terraform-provider-azurerm_v3.92.0_x5: AzureRM Response for https://management.azure.com/subscriptions/<SubscriptionID>/resourceGroups/rg-infr-dev-weu/providers/Microsoft.RecoveryServices/vaults/rsv-inf-test1-weu-01?api-version=2022-10-01: 
HTTP/2.0 404 Not Found
Content-Length: 241
Cache-Control: no-cache
Content-Type: application/json; charset=utf-8
Date: Mon, 19 Feb 2024 16:58:24 GMT
Expires: -1
Pragma: no-cache
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Content-Type-Options: nosniff
X-Ms-Correlation-Request-Id: 55101fe7-0da8-08ee-d02b-bece7797dc6c
X-Ms-Failure-Cause: gateway
X-Ms-Request-Id: d5f0d3a4-05d9-4c7d-93ca-9c9e4809806d
X-Ms-Routing-Request-Id: WESTEUROPE:20240219T165825Z:d5f0d3a4-05d9-4c7d-93ca-9c9e4809806d

{"error":{"code":"ResourceNotFound","message":"The Resource 'Microsoft.RecoveryServices/vaults/rsv-inf-test1-weu-01' under resource group 'rg-infr-dev-weu' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"}}: timestamp=2024-02-19T16:58:25.944Z
2024-02-19T16:58:25.945Z [DEBUG] provider.terraform-provider-azurerm_v3.92.0_x5: AzureRM Request: 



2024-02-19T16:58:25.945Z [DEBUG] provider.terraform-provider-azurerm_v3.92.0_x5: AzureRM Request: 
PUT /subscriptions/<SubscriptionID>/resourceGroups/rg-infr-dev-weu/providers/Microsoft.RecoveryServices/vaults/rsv-inf-test1-weu-01?api-version=2022-10-01 HTTP/1.1
Host: management.azure.com
User-Agent: HashiCorp/go-azure-sdk (Go-http-Client/1.1 vaults/2022-10-01) HashiCorp Terraform/1.7.3 (+https://www.terraform.io) Terraform Plugin SDK/2.10.1 terraform-provider-azurerm/3.92.0 VSTS_e564b9d1-9ce7-4e9b-8340-069eb7224679_build_42_0 pid-222c6c49-1b0a-5959-a213-6608f9eb8820
Content-Length: 361
Content-Type: application/json; charset=utf-8
X-Ms-Correlation-Request-Id: 55101fe7-0da8-08ee-d02b-bece7797dc6c
Accept-Encoding: gzip

{"identity":{"type":"SystemAssigned, UserAssigned","userAssignedIdentities":{"/subscriptions/<SubscriptionID>/resourceGroups/rg-infr-dev-weu/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uid-rsv-infr-cmk-dev-weu-01":{}}},"location":"westeurope","properties":{"publicNetworkAccess":"Enabled"},"sku":{"name":"Standard"},"tags":{}}: timestamp=2024-02-19T16:58:25.944Z



2024-02-19T16:58:27.940Z [DEBUG] provider.terraform-provider-azurerm_v3.92.0_x5: AzureRM Response for https://management.azure.com/subscriptions/<SubscriptionID>/resourceGroups/rg-infr-dev-weu/providers/Microsoft.RecoveryServices/vaults/rsv-inf-test1-weu-01?api-version=2022-10-01: 
HTTP/2.0 201 Created
Content-Length: 637
Azure-Asyncoperation: https://management.azure.com/subscriptions/<SubscriptionID>/resourceGroups/rg-infr-dev-weu/providers/Microsoft.RecoveryServices/vaults/rsv-inf-test1-weu-01/operationStatus/MjA0Nzs4MmFkNWE4OC0xOWZlLTRmM2EtYjdkNi1lNjhiYTU3OWNiNzA=?api-version=2022-10-01&t=638439587079053706&c=MIIHHjCCBgagAwIBAgITfwKXG3SnI9I2WcTInAAEApcbdDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjQwMTMxMDE0MjM2WhcNMjUwMTI1MDE0MjM2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJqvIN7raM0nnLSUvy4JWhEQgNuYNCErpZkdqGeEsSQJhS7R9gmwXEOVrutiBfEfndllIXg8Zo11yjgHhLKQWBCKPK29F5zhA8ZIR4vuP3NTullOaOP7n9SEHslZ4j4ye_VScjqlSHkjaggENl8hT-N0cNS3Y10CCEGl7wD8lzmbhOMHfnRMeqUK-imb_wWZxA9d8xQEq3kRHhSjrvll_GHWpBAnVDTj5G0-A6gNhEZZ5I00Ye2eTIhblfSGzFCRIbhP5mNZCPqbuvj9S-qKRtDBks8FmMkDR7nb4qcz3-wjH7RHr0zBRrMjGHp8HS6-ygvCY9sL2E5JH9yUkpqhsKECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaB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UuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAr5UbAYIYdynj4L28zbJjJAGv8yBVH1SErLVjjhcrEymsnkaWwCCu3tLwNijsevoXAEqIepjip57DWH1QlIEdHZBHTSHYW9GByVR3c92T02cmGRMmOyp6KoxPRkfceG6yEqCPCsOAxste8UEjxGxBb6UDE--FQHvshr4l6xfPvzYE4DV-IINekzCBZrEIOr2zNwxvK1AhcdJhGtlXh_hIq77bolABN51W2puWtstuDgUWwMm_wl7jrRyO8Qzl4eW_mAevfvyXSYPcgfG7s8g1ROZ5DG-dvKQj4vdR_yxl9d_0e8CLZkfKPWjdX7JNs0yCEUS1ahx15fSLVNRrrDDG0&s=GUfJsjVrt0MsMQN-oIwMjjXOaloyf31KWaveb0k_7fYznMbnInGhHkKV-lGxUOkrFhiGBAgbVEWtDSx_4SRKj41Cl0FQ_lVeSf3WQfbqzM_jAw-_wcDSW892YvBLEchekkjWezA568Vlyn5pQG0FpLQGKIUknYkSn3TbxASYfAk_Ijhr56lKZAT6O36GSrZMih0aG2yCKZolHOFI20mqEAFq_mofcpUJepq8RHF0srZEc_7L9fg3kKmrXGEgacy4qVrIN3wwROysyvWD6mnpAeTOgAMQgg000BuVOvj1IrT9tmMGZte32vXJ1SpP7iXrC6NvxlWPQCttJGaMZRheXw&h=Zk9Vx8G3ndrWYuDgfMm15j6x9OQStwhZP08P8_mnAkE
Cache-Control: no-cache
Content-Type: application/json; charset=utf-8
Date: Mon, 19 Feb 2024 16:58:27 GMT
Expires: -1
Pragma: no-cache
Retry-After: 60
Server: Kestrel
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Content-Type-Options: nosniff
X-Ms-Client-Request-Id: d958f485-1c4d-4516-aec6-eb7030464a33
X-Ms-Correlation-Request-Id: 55101fe7-0da8-08ee-d02b-bece7797dc6c
X-Ms-Ratelimit-Remaining-Subscription-Resource-Requests: 209
X-Ms-Request-Id: 55101fe7-0da8-08ee-d02b-bece7797dc6c
X-Ms-Routing-Request-Id: WESTEUROPE:20240219T165827Z:71242026-8f5a-4fba-bf15-2953f63087da

{"location":"westeurope","name":"rsv-inf-test1-weu-01","etag":"W/\"datetime'2024-02-19T16%3A58%3A27.6529364Z'\"","tags":{},"identity":{"type":"None"},"properties":{"provisioningState":"Provisioning","privateEndpointStateForBackup":"None","privateEndpointStateForSiteRecovery":"None","redundancySettings":{"standardTierStorageRedundancy":"Invalid","crossRegionRestore":"Disabled"},"publicNetworkAccess":"Enabled"},"id":"/subscriptions/<SubscriptionID>/resourceGroups/rg-infr-dev-weu/providers/Microsoft.RecoveryServices/vaults/rsv-inf-test1-weu-01","type":"Microsoft.RecoveryServices/vaults","sku":{"name":"Standard"}}: timestamp=2024-02-19T16:58:27.940Z

Expected Behaviour

The created Recovery Services vault has both Identities assigned:

  • System Assigned Identity
  • User Assigned Identitiy from the referenced resource

Actual Behaviour

The Recovery Services Vault ist created, but no identity is set. Not the System Assigned Identitiy, and also not the User Assigned Identity.

Testing with the same deployment but with either System Assigned OR User Assigned the Recovery Services Vault is created as expected with the defined Identity.

  • type = "SystemAssigned, UserAssigned" --> not working
  • type = "SystemAssigned" --> working
  • type = "UserAssigned" --> working

Steps to Reproduce

  1. create config as above
  2. terraform apply

Important Factoids

No response

References

No response

Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants