From 1565fad33c4f92d3e3cf391f387cc56d95f2298c Mon Sep 17 00:00:00 2001 From: Peter Budai Date: Fri, 29 Nov 2024 12:23:19 +0000 Subject: [PATCH] feat: Add fully qualified domain name output for deployed SQL server Closes #3820 --- avm/res/sql/server/README.md | 1 + avm/res/sql/server/main.bicep | 3 +++ avm/res/sql/server/main.json | 9 ++++++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/avm/res/sql/server/README.md b/avm/res/sql/server/README.md index e7ef975f8a..032341619c 100644 --- a/avm/res/sql/server/README.md +++ b/avm/res/sql/server/README.md @@ -4112,6 +4112,7 @@ Specifies whether to use the storage account access key to access the storage ac | Output | Type | Description | | :-- | :-- | :-- | | `exportedSecrets` | | A hashtable of references to the secrets exported to the provided Key Vault. The key of each reference is each secret's name. | +| `fullyQualifiedDomainName` | string | The fully qualified domain name of the deployed SQL server. | | `location` | string | The location the resource was deployed into. | | `name` | string | The name of the deployed SQL server. | | `privateEndpoints` | array | The private endpoints of the SQL server. | diff --git a/avm/res/sql/server/main.bicep b/avm/res/sql/server/main.bicep index a7fa9551ca..33c61e2822 100644 --- a/avm/res/sql/server/main.bicep +++ b/avm/res/sql/server/main.bicep @@ -522,6 +522,9 @@ output name string = server.name @description('The resource ID of the deployed SQL server.') output resourceId string = server.id +@description('The fully qualified domain name of the deployed SQL server.') +output fullyQualifiedDomainName string = server.properties.fullyQualifiedDomainName + @description('The resource group of the deployed SQL server.') output resourceGroupName string = resourceGroup().name diff --git a/avm/res/sql/server/main.json b/avm/res/sql/server/main.json index dbdc62dc23..e6817c82b9 100644 --- a/avm/res/sql/server/main.json +++ b/avm/res/sql/server/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.31.92.45157", - "templateHash": "1261593764623972732" + "templateHash": "2810003323744846464" }, "name": "Azure SQL Servers", "description": "This module deploys an Azure SQL Server.", @@ -5576,6 +5576,13 @@ }, "value": "[resourceId('Microsoft.Sql/servers', parameters('name'))]" }, + "fullyQualifiedDomainName": { + "type": "string", + "metadata": { + "description": "The fully qualified domain name of the deployed SQL server." + }, + "value": "[reference('server').fullyQualifiedDomainName]" + }, "resourceGroupName": { "type": "string", "metadata": {