Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add fully qualified domain name output for deployed SQL server #3863

Merged
merged 1 commit into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions avm/res/sql/server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |
Expand Down
3 changes: 3 additions & 0 deletions avm/res/sql/server/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 8 additions & 1 deletion avm/res/sql/server/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down Expand Up @@ -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": {
Expand Down