Skip to content

azurermSynapseLinkedService

Manages a Synapse Linked Service.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
  this,
  "example",
  {
    location: "West Europe",
    name: "example",
  }
);
const azurermStorageAccountExample = new azurerm.storageAccount.StorageAccount(
  this,
  "example_1",
  {
    account_kind: "BlobStorage",
    account_replication_type: "LRS",
    account_tier: "Standard",
    location: azurermResourceGroupExample.location,
    name: "example",
    resource_group_name: azurermResourceGroupExample.name,
  }
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermStorageAccountExample.overrideLogicalId("example");
const azurermStorageDataLakeGen2FilesystemExample =
  new azurerm.storageDataLakeGen2Filesystem.StorageDataLakeGen2Filesystem(
    this,
    "example_2",
    {
      name: "example",
      storage_account_id: azurermStorageAccountExample.id,
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermStorageDataLakeGen2FilesystemExample.overrideLogicalId("example");
const azurermSynapseWorkspaceExample =
  new azurerm.synapseWorkspace.SynapseWorkspace(this, "example_3", {
    identity: [
      {
        type: "SystemAssigned",
      },
    ],
    location: azurermResourceGroupExample.location,
    managed_virtual_network_enabled: true,
    name: "example",
    resource_group_name: azurermResourceGroupExample.name,
    sql_administrator_login: "sqladminuser",
    sql_administrator_login_password: "H@Sh1CoR3!",
    storage_data_lake_gen2_filesystem_id:
      azurermStorageDataLakeGen2FilesystemExample.id,
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermSynapseWorkspaceExample.overrideLogicalId("example");
const azurermSynapseFirewallRuleExample =
  new azurerm.synapseFirewallRule.SynapseFirewallRule(this, "example_4", {
    end_ip_address: "255.255.255.255",
    name: "allowAll",
    start_ip_address: "0.0.0.0",
    synapse_workspace_id: azurermSynapseWorkspaceExample.id,
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermSynapseFirewallRuleExample.overrideLogicalId("example");
const azurermSynapseIntegrationRuntimeAzureExample =
  new azurerm.synapseIntegrationRuntimeAzure.SynapseIntegrationRuntimeAzure(
    this,
    "example_5",
    {
      location: azurermResourceGroupExample.location,
      name: "example",
      synapse_workspace_id: azurermSynapseWorkspaceExample.id,
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermSynapseIntegrationRuntimeAzureExample.overrideLogicalId("example");
const azurermSynapseLinkedServiceExample =
  new azurerm.synapseLinkedService.SynapseLinkedService(this, "example_6", {
    depends_on: [`\${${azurermSynapseFirewallRuleExample.fqn}}`],
    integration_runtime: [
      {
        name: azurermSynapseIntegrationRuntimeAzureExample.name,
      },
    ],
    name: "example",
    synapse_workspace_id: azurermSynapseWorkspaceExample.id,
    type: "AzureBlobStorage",
    type_properties_json: `{
  "connectionString": "\${${azurermStorageAccountExample.primaryConnectionString}}"
}
`,
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermSynapseLinkedServiceExample.overrideLogicalId("example");

Arguments Reference

The following arguments are supported:

  • name - (Required) The name which should be used for this Synapse Linked Service. Changing this forces a new Synapse Linked Service to be created.

  • synapseWorkspaceId - (Required) The Synapse Workspace ID in which to associate the Linked Service with. Changing this forces a new Synapse Linked Service to be created.

  • type - (Required) The type of data stores that will be connected to Synapse. Valid Values include amazonMws, amazonRdsForOracle, amazonRdsForSqlServer, amazonRedshift, amazonS3, azureBatch. Changing this forces a new resource to be created. azureBlobFs, azureBlobStorage, azureDataExplorer, azureDataLakeAnalytics, azureDataLakeStore, azureDatabricks, azureDatabricksDeltaLake, azureFileStorage, azureFunction, azureKeyVault, azureMl, azureMlService, azureMariaDb, azureMySql, azurePostgreSql, azureSqlDw, azureSqlDatabase, azureSqlMi, azureSearch, azureStorage, azureTableStorage, cassandra, commonDataServiceForApps, concur, cosmosDb, cosmosDbMongoDbApi, couchbase, customDataSource, db2, drill, dynamics, dynamicsAx, dynamicsCrm, eloqua, fileServer, ftpServer, googleAdWords, googleBigQuery, googleCloudStorage, greenplum, hBase, hdInsight, hdInsightOnDemand, httpServer, hdfs, hive, hubspot, impala, informix, jira, linkedService, magento, mariaDb, marketo, microsoftAccess, mongoDb, mongoDbAtlas, mongoDbV2, mySql, netezza, oData, odbc, office365, oracle, oracleServiceCloud, paypal, phoenix, postgreSql, presto, quickBooks, responsys, restService, sqlServer, salesforce, salesforceMarketingCloud, salesforceServiceCloud, sapBw, sapCloudForCustomer, sapEcc, sapHana, sapOpenHub, sapTable, serviceNow, sftp, sharePointOnlineList, shopify, snowflake, spark, square, sybase, teradata, vertica, web, xero, zoho.

  • typePropertiesJson - (Required) A JSON object that contains the properties of the Synapse Linked Service.


  • additionalProperties - (Optional) A map of additional properties to associate with the Synapse Linked Service.

  • annotations - (Optional) List of tags that can be used for describing the Synapse Linked Service.

  • description - (Optional) The description for the Synapse Linked Service.

  • integrationRuntime - (Optional) A integrationRuntime block as defined below.

  • parameters - (Optional) A map of parameters to associate with the Synapse Linked Service.


A integrationRuntime block supports the following:

  • name - (Required) The integration runtime reference to associate with the Synapse Linked Service.

  • parameters - (Optional) A map of parameters to associate with the integration runtime.

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

  • id - The ID of the Synapse Linked Service.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 30 minutes) Used when creating the Synapse Linked Service.
  • read - (Defaults to 5 minutes) Used when retrieving the Synapse Linked Service.
  • update - (Defaults to 30 minutes) Used when updating the Synapse Linked Service.
  • delete - (Defaults to 30 minutes) Used when deleting the Synapse Linked Service.

Import

Synapse Linked Services can be imported using the resourceId, e.g.

terraform import azurerm_synapse_linked_service.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.Synapse/workspaces/workspace1/linkedServices/linkedservice1