Azure / Azure/bicep-registry-modules
[AVM Module Issue]: Missing tags for database created in the failover group
- Dominant language
- Bicep
- Stars
- 736
- Forks
- 564
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 30
Description
### Check for previous/existing GitHub issues
- [x] I have checked for previous/existing GitHub issues
### Issue Type?
Bug
### Module Name
avm/res/sql/server
### (Optional) Module Version
0.13.1
### Description
Hello, I'm deploying a server and a failover group, I noticed that the DB created in the failover server won't carry any tags. In some settings (like in my case) companies may require resources to be tagged for compliance or FinOps.
How to reproduce:
Deploy this very simple bicep:
```
module server 'br/public:avm/res/sql/server:0.13.1' = {
name: 'serverDeployment'
params: {
// Required parameters
name: 'ssfog001'
// Non-required parameters
administratorLogin: 'adminUserName'
administratorLoginPassword: '[REDACTED]'
databases: [
{
maxSizeBytes: 2147483648
name: 'ssfog-db1'
sku: {
name: 'S1'
tier: 'Standard'
}
zoneRedundant: false
}
]
failoverGroups: [
{
databases: [
'ssfog-db1'
]
name: 'ssfog-fg-geo'
partnerServers: [
'ssfog001-fo'
]
readWriteEndpoint: {
failoverPolicy: 'Manual'
}
secondaryType: 'Geo'
}
]
location: 'canadacentral'
tags: {
myTag: 'myValue'
}
}
}
module failover 'br/public:avm/res/sql/server:0.13.1' = {
name: 'failoverDeployment'
params: {
// Required parameters
name: 'ssfog001-fo'
// Non-required parameters
administratorLogin: 'adminUserName'
administratorLoginPassword: '[REDACTED]'
location: 'northeurope'
tags: {
myTag: 'myValue'
}
}
}
```
Here, `ssfog001` is my primary server and `ssfog001-fo` is my secondary server for the failover.
Resources are created just fine:
The primary server has the tags as specified:
The database in the primary server inherited its tags:
Secondary (failover) server has the tag as specified:
But for the database created in this secondary server, there are no tags whatsoever
Shouldn't the database in the secondary server inherit the tags from the server just like in the primary server for the sake of consistency? Or either the tags from the database in the primary server as they are related? Or is this behaviour by design?
Best regards
### (Optional) Correlation Id
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.