Skip to content

Data Source: azurermSqlServer

Use this data source to access information about an existing SQL Azure Database Server.

-> Note: The azurermSqlServer data source is deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0. Please use the azurermMssqlServer data source instead.

Example Usage

import * as cdktf from "cdktf";
/*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 dataAzurermSqlServerExample =
  new azurerm.dataAzurermSqlServer.DataAzurermSqlServer(this, "example", {
    name: "examplesqlservername",
    resource_group_name: "example-resources",
  });
new cdktf.TerraformOutput(this, "sql_server_id", {
  value: dataAzurermSqlServerExample.id,
});

Argument Reference

  • name - The name of the SQL Server.

  • resourceGroupName - Specifies the name of the Resource Group where the SQL Server exists.

Attributes Reference

  • id - The id of the SQL Server resource.

  • location - The location of the Resource Group in which the SQL Server exists.

  • fqdn - The fully qualified domain name of the SQL Server.

  • version - The version of the SQL Server.

  • administratorLogin - The administrator username of the SQL Server.

  • identity - An identity block as defined below.

  • tags - A mapping of tags assigned to the resource.


An identity block exports the following:

  • principalId - The Principal ID associated with this Managed Service Identity.

  • tenantId - The Tenant ID associated with this Managed Service Identity.

  • type - The identity type of this Managed Service Identity.

Timeouts

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

  • read - (Defaults to 5 minutes) Used when retrieving the SQL Azure Database Server.