Azure Data Factory Dataset MySQL

This page shows how to write Terraform and Azure Resource Manager for Data Factory Dataset MySQL and write them securely.

azurerm_data_factory_dataset_mysql (Terraform)

The Dataset MySQL in Data Factory can be configured in Terraform with the resource name azurerm_data_factory_dataset_mysql. The following sections describe 7 examples of how to use the resource and its parameters.

Example Usage from GitHub

main.tf#L11
resource "azurerm_data_factory_dataset_mysql" "dataset-mysql" {
  name                = "example"
  resource_group_name = var.resource_group_name
  data_factory_name   = var.data_factory_name
  linked_service_name = azurerm_data_factory_linked_service_mysql.linked-service.name

module.tf#L1
resource "azurerm_data_factory_dataset_mysql" "dataset" {
  name                  = var.name
  resource_group_name   = var.resource_group_name
  data_factory_name     = var.data_factory_name
  linked_service_name   = var.linked_service_name
  table_name            = try(var.table_name, null)
module.tf#L1
resource "azurerm_data_factory_dataset_mysql" "dataset" {
  name                  = var.name
  resource_group_name   = var.resource_group_name
  data_factory_name     = var.data_factory_name
  linked_service_name   = var.linked_service_name
  table_name            = try(var.table_name, null)
main.tf#L7
resource "azurerm_data_factory_dataset_mysql" "this" {
  additional_properties = var.additional_properties
  annotations           = var.annotations
  data_factory_name     = var.data_factory_name
  description           = var.description
  folder                = var.folder
main.tf#L7
resource "azurerm_data_factory_dataset_mysql" "this" {
  additional_properties = var.additional_properties
  annotations           = var.annotations
  data_factory_name     = var.data_factory_name
  description           = var.description
  folder                = var.folder
module.tf#L1
resource "azurerm_data_factory_dataset_mysql" "dataset" {
  name                  = var.name
  resource_group_name   = var.resource_group_name
  data_factory_name     = var.data_factory_name
  linked_service_name   = var.linked_service_name
  table_name            = try(var.table_name, null)
module.tf#L10
resource "azurerm_data_factory_dataset_mysql" "dataset" {
  name                  = azurecaf_name.dataset.name
  resource_group_name   = var.resource_group_name
  data_factory_name     = var.data_factory_name
  linked_service_name   = var.linked_service_name
  table_name            = try(var.settings.table_name, null)

Review your Terraform file for Azure best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Manages a MySQL Dataset inside a Azure Data Factory.

Tips: Best Practices for The Other Azure Data Factory Resources

In addition to the azurerm_data_factory, Azure Data Factory has the other resources that should be configured for security reasons. Please check some examples of those resources and precautions.

risk-label

azurerm_data_factory

Ensure to disable public access

It is better to disable public access for Data Factory, which is enabled as default.

Review your Azure Data Factory settings

In addition to the above, there are other security points you should be aware of making sure that your .tf files are protected in Shisho Cloud.

Microsoft.DataFactory/factories/datasets (Azure Resource Manager)

The factories/datasets in Microsoft.DataFactory can be configured in Azure Resource Manager with the resource name Microsoft.DataFactory/factories/datasets. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.

Parameters

  • apiVersion required - string
  • name required - string

    The dataset name.

  • properties required
      • additionalProperties optional - object

        Unmatched properties from the message are deserialized this collection

      • annotations optional - array

        List of tags that can be used for describing the Dataset.

      • description optional - string

        Dataset description.

      • folder optional
          • name optional - string

            The name of the folder that this Dataset is in.

      • linkedServiceName required
          • parameters optional - object

            An object mapping parameter names to argument values.

          • referenceName required - string

            Reference LinkedService name.

          • type required - string

            Linked service reference type.

      • parameters optional - undefined

        Definition of all parameters for an entity.

      • schema optional - object

        Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement.

      • structure optional - object

        Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement.

  • type required - string

Frequently asked questions

What is Azure Data Factory Dataset MySQL?

Azure Data Factory Dataset MySQL is a resource for Data Factory of Microsoft Azure. Settings can be wrote in Terraform.

Where can I find the example code for the Azure Data Factory Dataset MySQL?

For Terraform, the AHEAD-Labs/azure-terraform, anmoltoppo/Terraform and pkhuntia/aztfmod source code examples are useful. See the Terraform Example section for further details.