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

azurerm_data_factory data source missing values #4827

Closed
lukerosser opened this issue Nov 7, 2019 · 3 comments · Fixed by #6492
Closed

azurerm_data_factory data source missing values #4827

lukerosser opened this issue Nov 7, 2019 · 3 comments · Fixed by #6492

Comments

@lukerosser
Copy link
Contributor

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

Terraform (and AzureRM Provider) Version

$ terraform -v
Terraform v0.12.13
+ provider.azurerm v1.36.1

Affected Resource(s)

https://www.terraform.io/docs/providers/azurerm/d/data_factory.html

  • azurerm_data_factory data source

Terraform Configuration Files

data "azurerm_data_factory" "datafactory" {
  name                = "datafactory"
  resource_group_name = "datafactory-rg"
}

output "data_factory_principal" {
  value = data.azurerm_data_factory.datafactory.identity.principal_id
}

output "data_factory_location" {
  value = data.azurerm_data_factory.datafactory.location
}

Expected Behavior

Datafactory principal ID displayed as an output

Actual Behavior

Error on plan:

Error: Unsupported attribute

  on XXXX, in output "data_factory_principal":
  11:   value = data.azurerm_data_factory.datafactory.identity.principal_id

This value does not have any attributes.
@jleechp-occm
Copy link

Trying today with:

Terraform v0.12.20
+ provider.azuread v0.7.0
+ provider.azurerm v2.0.0

Terraform code:

locals {
  adf_prefix = "<redacted>"
}

data "azurerm_data_factory" adf {
  name                = "${local.adf_prefix}-adf"
  resource_group_name = "${local.adf_prefix}-rg"
}

data "azuread_service_principal" adf {
  display_name = "${local.adf_prefix}-adf"
}

output "ad_adf" {
  value = data.azuread_service_principal.adf
}

output "adf" {
  value = data.azurerm_data_factory.adf
}

provider azurerm {
  features {}
}

terraform apply and terraform refresh provide the following:

ad_adf = {
  "app_roles" = []
  "application_id" = "<app-id>"
  "display_name" = "<name>"
  "id" = "<id>"
  "oauth2_permissions" = []
  "object_id" = "<id>"
}
adf = {}

It looks as though the Data Factory data source is not returning any properties.

pearcec pushed a commit to pearcec/terraform-provider-azurerm that referenced this issue Apr 15, 2020
The data source for data factory id was not set during Read.  Set the ID
added a better acctest to validate.
@tombuildsstuff tombuildsstuff added this to the v2.6.0 milestone Apr 16, 2020
tombuildsstuff added a commit that referenced this issue Apr 16, 2020
…e_missing_values_#4827

ID not set when retrieving data factory fix #4827
@ghost
Copy link

ghost commented Apr 16, 2020

This has been released in version 2.6.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.6.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented May 16, 2020

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators May 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants