ResourceModules icon indicating copy to clipboard operation
ResourceModules copied to clipboard

[Bug Report]: Minor bug in key vault's diagnostic settings name

Open khaliddermoumi opened this issue 2 years ago • 4 comments

Describe the bug

The diagnostic settings name in the key vault module (git tag v0.5.0) is:

 '${name_var}-diagnosticSettingName'.

The intention was obviously:

'${name_var}-${diagnosticSettingsName}'

There is also a now unused variable "diagnosticSettingsName", which would make sense if it was used in the name.

To reproduce

Create a key vault with the v0.5.0 version of the module.

Code snippet

(omitted, just the plain vanilla usage of the module)

Relevant log output

C:\...\ResourceModules\arm\Microsoft.KeyVault\vaults\deploy.bicep(124,7) : Warning no-unused-params: Parameter "diagnosticSettingsName" is declared but never used. [https://aka.ms/bicep/linter/no-unused-params]

khaliddermoumi avatar Jun 01 '22 11:06 khaliddermoumi

I could submit a pull request, if you are interested!

khaliddermoumi avatar Jun 01 '22 11:06 khaliddermoumi

I believe this was already fixed in the latest version? or do you still see this issue in the latest version of the file.

akata72 avatar Jun 02 '22 19:06 akata72

I was fixed in that the variable is now used. However, the solution isn't ideal as @khaliddermoumi correctly pointed out it should reference ${name_var} in the diagnostic settings name. The problem is, this value is a variable and not available for a default value of a parameter. Anyhow, this issue may resolve itself following #1443 .

AlexanderSehr avatar Jun 04 '22 10:06 AlexanderSehr

See #1443 - depends on that issue.

rahalan avatar Jun 07 '22 16:06 rahalan

Closed by #1757

eriqua avatar Sep 01 '22 09:09 eriqua