From 91329e9c9c9d8a9fd723b347208273c7faacd7a2 Mon Sep 17 00:00:00 2001 From: Peter Budai Date: Fri, 29 Nov 2024 14:14:20 +0100 Subject: [PATCH] feat: Add fully qualified domain name output for deployed SQL server (#3863) Closes #3820 ## Description ## Pipeline Reference | Pipeline | | -------- | | [![avm.res.sql.server](https://github.com/peterbud/bicep-registry-modules/actions/workflows/avm.res.sql.server.yml/badge.svg)](https://github.com/peterbud/bicep-registry-modules/actions/workflows/avm.res.sql.server.yml) | ## Type of Change - [ ] Update to CI Environment or utilities (Non-module affecting changes) - [ ] Azure Verified Module updates: - [ ] Bugfix containing backwards-compatible bug fixes, and I have NOT bumped the MAJOR or MINOR version in `version.json`: - [ ] Someone has opened a bug report issue, and I have included "Closes #{bug_report_issue_number}" in the PR description. - [ ] The bug was found by the module author, and no one has opened an issue to report it yet. - [x] Feature update backwards compatible feature updates, and I have bumped the MINOR version in `version.json`. - [ ] Breaking changes and I have bumped the MAJOR version in `version.json`. - [ ] Update to documentation ## Checklist - [x] I'm sure there are no other open Pull Requests for the same update/change - [x] I have run `Set-AVMModule` locally to generate the supporting module files. - [ ] My corresponding pipelines / checks run clean and green without any errors or warnings --- 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": {