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

Getting parsing "": parsing "" cannot parsing an empty string in azurerm_data_factory; I am getting this parsing error post imported the CMK #28256

Open
1 task done
thennarasud opened this issue Dec 11, 2024 · 2 comments

Comments

@thennarasud
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 comments along the lines of "+1", "me too" or "any updates", 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.6.6

AzureRM Provider Version

4.0.0

Affected Resource(s)/Data Source(s)

azurerm_data_factory

Terraform Configuration Files

resource "azurerm_resource_group" "adf_rg" {
  name     = var.adf_rg
  location = var.location
  }

resource "azurerm_data_factory" "adf" {
  name                              = var.adf_studio
  location                          = azurerm_resource_group.adf_rg.location
  resource_group_name               = azurerm_resource_group.adf_rg.name
  public_network_enabled            = var.adf_public_network_allow
  customer_managed_key_id           = var.adf_cmk_key_id

 

  vsts_configuration {
    account_name     = var.vsts_config_account_name
    branch_name      = var.vsts_config_branch_name
    project_name     = var.vsts_config_project_name
    repository_name  = var.vsts_config_repository_name
    root_folder      = var.vsts_config_rootfolder_name
    tenant_id        = var.vsts_config_devops_tenant_id
    publishing_enabled = var.vsts_config_publish_enabled
  }

  identity {
    type = "SystemAssigned, UserAssigned"
    identity_ids = var.adf_user_msi_ids
  }

  lifecycle {
    ignore_changes = [ vsts_configuration, managed_virtual_network_enabled, customer_managed_key_id ]
  }

  tags = {
    Agency-Code = var.tag_agency_code
    Project-Code =  var.tag_project_code
    Environment = var.tag_environment
    Zone  = var.tag_zone
    Tier  = var.tag_tier
  }

}

Debug Output/Panic Output

Error: parsing "": parsing "": cannot parse an empty string
│
│   with module.data_factory_frontend.azurerm_data_factory.adf,
│   on ..\modules\az-data-factory\az-data-factory.tf line 6, in resource "azurerm_data_factory" "adf":
│    6: resource "azurerm_data_factory" "adf" {

Expected Behaviour

No changes on your infrastructure

Actual Behaviour

Error: parsing "": parsing "": cannot parse an empty string

│ with module.data_factory_frontend.azurerm_data_factory.adf,
│ on ..\modules\az-data-factory\az-data-factory.tf line 6, in resource "azurerm_data_factory" "adf":
│ 6: resource "azurerm_data_factory" "adf" {

Steps to Reproduce

No response

Important Factoids

No response

References

No response

@gerrytan
Copy link
Contributor

Hi @thennarasud from the provider doc: there's another property customer_managed_key_identity_id with following description:

(Optional) Specifies the ID of the user assigned identity associated with the Customer Managed Key. Must be supplied if customer_managed_key_id is set.

While I agree there might be a validation / error handling bug here, can you please try supply this property to check if this can solve your problem?

@thennarasud
Copy link
Author

Hi @thennarasud from the provider doc: there's another property customer_managed_key_identity_id with following description:

(Optional) Specifies the ID of the user assigned identity associated with the Customer Managed Key. Must be supplied if customer_managed_key_id is set.

While I agree there might be a validation / error handling bug here, can you please try supply this property to check if this can solve your problem?

Hi @gerrytan (Gary), I have used this property also in my code, also I have tried updating this value with a new user msi and modified statefile to reflect with `customer_managed_key_identity_id' however still its throwing the parsing error.

I doubt whether this is the Terraform issue, because eventhough i have updated the statefile with `customer_managed_key_identity_id when i checked the ADF JSON file, still my ID is showing as empty. I am not sure whether the issue is residing.

Thanks for your insight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants