Skip to content

azurermSynapseSqlPool

Manages a Synapse SQL Pool.

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-resources",
  }
);
const azurermStorageAccountExample = new azurerm.storageAccount.StorageAccount(
  this,
  "example_1",
  {
    account_kind: "BlobStorage",
    account_replication_type: "LRS",
    account_tier: "Standard",
    location: azurermResourceGroupExample.location,
    name: "examplestorageacc",
    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,
    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 azurermSynapseSqlPoolExample = new azurerm.synapseSqlPool.SynapseSqlPool(
  this,
  "example_4",
  {
    create_mode: "Default",
    name: "examplesqlpool",
    sku_name: "DW100c",
    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.*/
azurermSynapseSqlPoolExample.overrideLogicalId("example");

Arguments Reference

The following arguments are supported:

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

  • synapseWorkspaceId - (Required) The ID of Synapse Workspace within which this SQL Pool should be created. Changing this forces a new Synapse SQL Pool to be created.

  • skuName - (Required) Specifies the SKU Name for this Synapse SQL Pool. Possible values are dw100C, dw200C, dw300C, dw400C, dw500C, dw1000C, dw1500C, dw2000C, dw2500C, dw3000C, dw5000C, dw6000C, dw7500C, dw10000C, dw15000C or dw30000C.

  • createMode - (Optional) Specifies how to create the SQL Pool. Valid values are: default, recovery or pointInTimeRestore. Must be default to create a new database. Defaults to default. Changing this forces a new resource to be created.

  • collation - (Optional) The name of the collation to use with this pool, only applicable when createMode is set to default. Azure default is sqlLatin1GeneralCp1CiAs. Changing this forces a new resource to be created.

  • dataEncrypted - (Optional) Is transparent data encryption enabled?

  • recoveryDatabaseId - (Optional) The ID of the Synapse SQL Pool or SQL Database which is to back up, only applicable when createMode is set to recovery. Changing this forces a new Synapse SQL Pool to be created.

  • restore - (Optional) A restore block as defined below. only applicable when createMode is set to pointInTimeRestore. Changing this forces a new resource to be created.

  • geoBackupPolicyEnabled - (Optional) Is geo-backup policy enabled? Defaults to true.

  • tags - (Optional) A mapping of tags which should be assigned to the Synapse SQL Pool.


An restore block supports the following:

  • sourceDatabaseId - (Required) The ID of the Synapse SQL Pool or SQL Database which is to restore. Changing this forces a new Synapse SQL Pool to be created.

  • pointInTime - (Required) Specifies the Snapshot time to restore formatted as an RFC3339 date string. Changing this forces a new Synapse SQL Pool to be created.

Attributes Reference

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

  • id - The ID of the Synapse SQL Pool.

Timeouts

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

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

Import

Synapse SQL Pool can be imported using the resourceId, e.g.

terraform import azurerm_synapse_sql_pool.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Synapse/workspaces/workspace1/sqlPools/sqlPool1