Skip to content

Commit

Permalink
feat: Add fully qualified domain name output for deployed SQL server (#…
Browse files Browse the repository at this point in the history
…3863)

Closes #3820

## Description

## Pipeline Reference

<!-- Insert your Pipeline Status Badge below -->

| 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

<!-- Use the checkboxes [x] on the options that are relevant. -->

- [ ] 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

<!-- Please keep up to date with the contribution guide at
https://aka.ms/avm/contribute/bicep -->
  • Loading branch information
peterbud authored Nov 29, 2024
1 parent 426a9ba commit 91329e9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
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

0 comments on commit 91329e9

Please sign in to comment.