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

azure_blob_storage_location.path should be optional for azurerm_data_factory_dataset_parquet #18995

Closed
1 task done
dankor opened this issue Oct 26, 2022 · 2 comments · Fixed by #19009
Closed
1 task done

Comments

@dankor
Copy link

dankor commented Oct 26, 2022

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.3.2

AzureRM Provider Version

3.28.0

Affected Resource(s)/Data Source(s)

azurerm_data_factory_dataset_parquet

Terraform Configuration Files

resource "azurerm_data_factory_dataset_parquet" "example" {
  name                = "example"
  data_factory_id     = azurerm_data_factory.example.id
  linked_service_name = azurerm_data_factory_linked_service_azure_blob_storage.example.name

  parameters = {
    "FileName"   = ""
    "FolderName" = ""
  }

  azure_blob_storage_location {
    container                 = "@dataset().FolderName"
    dynamic_container_enabled = true
    dynamic_filename_enabled  = true
    dynamic_path_enabled      = false
    filename                  = "@dataset().FileName"
  }
}


### Debug Output/Panic Output

```shell
Validation:
"""
│ Error: Missing required argument
│ 
│   on modules/synapse/main.tf line 137, in resource "azurerm_data_factory_dataset_parquet" "output":
│  137:   azure_blob_storage_location {
│ 
│ The argument "path" is required, but no definition was found.
"""

Expected Behaviour

When I checked a plan against manually modifying a resource I got the following:

  ~ resource "azurerm_data_factory_dataset_parquet" "output" {
        id                    = "[MASKED]"
        name                  = "example"
        # (6 unchanged attributes hidden)
      ~ azure_blob_storage_location {
          - path                      = "/" -> null
            # (5 unchanged attributes hidden)
        }
    }

It means It can be null. For azurerm_data_factory_dataset_delimited_text it works as expected.

Actual Behaviour

No errors during the validation.

Steps to Reproduce

  • Create a resource:
resource "azurerm_resource_group" "example" {
  name     = "example-resources"
  location = "West Europe"
}

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

resource "azurerm_data_factory_linked_service_web" "example" {
  name                = "example"
  data_factory_id     = azurerm_data_factory.example.id
  authentication_type = "Anonymous"
  url                 = "https://www.bing.com"
}

resource "azurerm_data_factory_dataset_parquet" "example" {
  name                = "example"
  data_factory_id     = azurerm_data_factory.example.id
  linked_service_name = azurerm_data_factory_linked_service_web.example.name

  compression_codec = "snappy"

  parameters = {
    "DestinationFile"   = ""
    "DestinationFolder" = ""
  }

  azure_blob_storage_location {
    container                 = "@dataset().DestinationFolder"
    dynamic_container_enabled = true
    dynamic_filename_enabled  = true
    dynamic_path_enabled      = true
    filename                  = "@dataset().DestinationFile"
    path                      = "/"
  }
}
  • Manually remove path value via the Azure portal
  • Run plan
  • Remove path argument from the tf file.
  • Run the validation.

Important Factoids

No response

References

No response

@github-actions
Copy link

This functionality has been released in v3.29.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@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 Nov 27, 2022
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.

3 participants