Use this data source to access information about an existing SQL Azure Database Server.
data "azurerm_sql_server" "example" {
name = "examplesqlservername"
resource_group_name = "example-resources"
}
output "sql_server_id" {
value = data.azurerm_sql_server.example.id
}
name
- The name of the SQL Server.
resource_group_name
- Specifies the name of the Resource Group where the SQL Server exists.
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.
administrator_login
- 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:
principal_id
- The Principal ID associated with this Managed Service Identity.
tenant_id
- The Tenant ID associated with this Managed Service Identity.
type
- The identity type of this Managed Service Identity.
The timeouts
block allows you to specify timeouts for certain actions:
read
- (Defaults to 5 minutes) Used when retrieving the SQL Azure Database Server.