Azure / Azure/bicep-registry-modules

[AVM Module Issue]: Missing tags for database created in the failover group

Open
#4,655 3 comments 0 reactions 1 assignee Assigned to @peterbud View on GitHub
Class: Resource Module :package: Language: Bicep :muscle: Needs: External Changes :hammer_and_pick: Status: Long Term :hourglass_flowing_sand: Type: AVM :a: :v: :m: Type: Bug :bug:
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:

Image

The primary server has the tags as specified:

Image

The database in the primary server inherited its tags:

Image

Secondary (failover) server has the tag as specified:

Image

But for the database created in this secondary server, there are no tags whatsoever

Image

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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.