hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.58k stars 4.62k forks source link

API Management Service Data Source does not expose identity data #8736

Closed sjentzsch closed 3 years ago

sjentzsch commented 4 years ago

Community Note

Terraform (and AzureRM Provider) Version

$terraform -v
Terraform v0.13.4
+ provider registry.terraform.io/hashicorp/azuread v1.0.0
+ provider registry.terraform.io/hashicorp/azurerm v2.30.0

Affected Resource(s)

Expected Behavior

I expect the datasource for the azurerm_api_management to contain information on the identity, as specified here:

Actual Behavior

The block identity is not contained, verified via terraform state show on the datasource, and also I get the error:

Error: Unsupported attribute

  on main.tf line 123, in resource "azurerm_key_vault_access_policy" "test":
 298:   tenant_id = data.azurerm_api_management.test.identity.tenant_id

This value does not have any attributes.
TheMacStack commented 4 years ago

Shouldn't this be labeled as a bug rather than enhancement? The documentation clearly states the Identity data should be returned when using Data Source: azurerm_api_management but it is not.

Apologize if i'm way off but when comparing to other services data calls it looks like the dataSourceApiManagementRead function is missing the call like this:

  if err := d.Set("identity", FlattenApiManagementIdentity(resp.Identity)); err != nil {
    return fmt.Errorf("setting `identity`: %+v", err)
  }
favoretti commented 3 years ago

Thanks for opening this issue! Since this issue seems to have been addressed in the latest versions of the provider - I'm going to close it. Please open a new updated bug report if this is still relevant. Thank you.

10429

github-actions[bot] commented 3 years ago

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.