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

Added support for SystemAssigned identity #154

Closed
wants to merge 3 commits into from

Conversation

j-rewerts
Copy link

Due to the issue discussed here, SystemAssigned MI don't have their object IDs populated on data.azurerm_client_config.current. This PR will allow a caller to provide the deployment object ID in a variable if needed.

Copy link
Contributor

@murggu murggu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@j-rewerts we've been working on allowing for external PR (from forked repos). Would you mind syncing your forked repo with the latest changes here?

@jdocampo
Copy link
Member

Hi @j-rewerts it seems that in the current version of azurerm we are using, 3.45.0, this issue is resolved.
I have tried with version 3.43.0 and I could reproduce the error (this is a VM with User Assigned Managed Identity):

terraform {

  required_providers {
    azurerm = {
      source  = "hashicorp/azurerm"
      version = "= 3.43.0"
    }
  }
}

provider "azurerm" {
  features {}
}

data azurerm_client_config current {}

output current_client_config {
    value = data.azurerm_client_config.current
}

image

But this is the test with 3.45.0:
image

Seems to be fixed since v3.44.1:
https://github.com/hashicorp/terraform-provider-azurerm/releases/tag/v3.44.1
hashicorp/terraform-provider-azurerm#20523

@j-rewerts
Copy link
Author

UA MI should work but I don't believe System Assigned will. Any chance you could try reproducing with a SAMI?

@jdocampo
Copy link
Member

jdocampo commented Mar 1, 2023

Hi @j-rewerts I have tested with System Assigned as well, seems to be working:
image
image

@j-rewerts
Copy link
Author

Ah my mistake! Closing.

@j-rewerts j-rewerts closed this Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants