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_dataset_delimited_text Panic due to the lack of azure_blob_storage_location.dynamic_container_enabled #16525

Closed
1 task done
lonegunmanb opened this issue Apr 24, 2022 · 1 comment

Comments

@lonegunmanb
Copy link
Contributor

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

Terraform Version

1.1.8

AzureRM Provider Version

3.3.0

Affected Resource(s)/Data Source(s)

azurerm_data_factory_dataset_delimited_text

Terraform Configuration Files

provider azurerm {
  features {}
}

resource azurerm_resource_group example {
  name     = "zjhef13545"
  location = "uksouth"
}

resource azurerm_storage_account example {
  name                      = "zjhef13545"
  resource_group_name       = azurerm_resource_group.example.name
  location                  = azurerm_resource_group.example.location
  account_kind              = "StorageV2"
  account_tier              = "Standard"
  account_replication_type  = "GRS"
  enable_https_traffic_only = true
}

resource azurerm_storage_container example {
  name                  = "zjhef13545"
  storage_account_name  = azurerm_storage_account.example.name
  container_access_type = "private"
}

resource azurerm_data_factory example {
  name                = "zjhef13545"
  resource_group_name = azurerm_resource_group.example.name
  location            = azurerm_resource_group.example.location
}

data "azurerm_client_config" "current" {
}

resource "azurerm_key_vault" "example" {
  name                = "zjhef13545"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  tenant_id           = data.azurerm_client_config.current.tenant_id
  sku_name            = "standard"
}

resource "azurerm_data_factory_linked_service_key_vault" "example" {
  name            = "zjhef135452"
  data_factory_id = azurerm_data_factory.example.id
  key_vault_id    = azurerm_key_vault.example.id
}

resource "azurerm_data_factory_linked_service_azure_blob_storage" "example" {
  name            = "zjhef13545"
  data_factory_id = azurerm_data_factory.example.id

  service_endpoint     = "https://storageaccountname.blob.core.windows.net"
  service_principal_id = "00000000-0000-0000-0000-000000000000"
  tenant_id            = "00000000-0000-0000-0000-000000000000"
  service_principal_linked_key_vault_key {
    linked_service_name = azurerm_data_factory_linked_service_key_vault.example.name
    secret_name         = "secret"
  }
}

resource azurerm_data_factory_dataset_delimited_text example {
  name                = "zjhef13545"
  data_factory_id     = azurerm_data_factory.example.id
  linked_service_name = azurerm_data_factory_linked_service_azure_blob_storage.example.name
  parameters          = {
    "subfolder" = "" # Map value sets parameter default value
  }

  first_row_as_header = true

  schema_column {
    name = "example"
    type = "String"
  }

  azure_blob_storage_location {
    container            = azurerm_storage_container.example.name
    path                 = "@dataset().subfolder"
    dynamic_path_enabled = true
  }
}

Debug Output/Panic Output

Error: Plugin did not respond
│
│   with azurerm_data_factory_dataset_delimited_text.example,
│   on main.tf line 63, in resource "azurerm_data_factory_dataset_delimited_text" "example":
│   63: resource azurerm_data_factory_dataset_delimited_text example {
│
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain more       
│ details.
╵

Stack trace from the terraform-provider-azurerm_v3.3.0_x5.exe plugin:

panic: interface conversion: interface {} is nil, not bool

goroutine 484 [running]:
github.com/hashicorp/terraform-provider-azurerm/internal/services/datafactory.expandDataFactoryDatasetAzureBlobStorageLocation(0xc0010775e0?)
        github.com/hashicorp/terraform-provider-azurerm/internal/services/datafactory/data_factory.go:408 +0x5b4
github.com/hashicorp/terraform-provider-azurerm/internal/services/datafactory.expandDataFactoryDatasetLocation(0x6b26980?)
        github.com/hashicorp/terraform-provider-azurerm/internal/services/datafactory/data_factory.go:354 +0xc9
github.com/hashicorp/terraform-provider-azurerm/internal/services/datafactory.resourceDataFactoryDatasetDelimitedTextCreateUpdate(0xc001cd7480, {0x5afd1
e0?, 0xc00058e700})
        github.com/hashicorp/terraform-provider-azurerm/internal/services/datafactory/data_factory_dataset_delimited_text_resource.go:331 +0x4e5        
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0xc000ee4bd0?, {0x6b34228?, 0xc00209d840?}, 0x2?, {0x5afd1e0?, 0xc00058e70
0?})
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:329 +0x178
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc000884460, {0x6b34228, 0xc00209d840}, 0xc0020b3d40, 0xc001cd7300, {0x5af
d1e0, 0xc00058e700})
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:467 +0x6f1
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc0000050f8, {0x6b34228, 0xc00209d840}, 0xc001eb78
10)
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:977 +0xd8a
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc0001b9300, {0x6b342d0?, 0xc001b347e0?}, 0xc0015b5810)     
        github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:603 +0x2ad
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x604e0c0?, 0xc0001b9300}, {0x6b342d0, 0xc0
01b347e0}, 0xc00062be00, 0x0)
        github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:380 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000216e00, {0x6b452e0, 0xc000438d80}, 0xc00136e000, 0xc001456db0, 0xa972400, 0x0)
        google.golang.org/[email protected]/server.go:1292 +0xc6f
google.golang.org/grpc.(*Server).handleStream(0xc000216e00, {0x6b452e0, 0xc000438d80}, 0xc00136e000, 0x0)
        google.golang.org/[email protected]/server.go:1617 +0xa1b
google.golang.org/grpc.(*Server).serveStreams.func1.2()
        google.golang.org/[email protected]/server.go:940 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
        google.golang.org/[email protected]/server.go:938 +0x28a

Error: The terraform-provider-azurerm_v3.3.0_x5.exe plugin crashed!

This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.

Expected Behaviour

No response

Actual Behaviour

Plugin panic and crashed.

Steps to Reproduce

No response

Important Factoids

No response

References

In pr #15749 the dynamic_container_enabled has been added into the azure_blob_storage_location's process logic, but no schema definition. I'll submit a pr to fix this issue.

@github-actions
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 May 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants