-
Notifications
You must be signed in to change notification settings - Fork 171
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
Made akvName contain random string #176
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the contribution, one of the team will evaluate shortly.
Can you run the bicep build action in your repo to generate the compiled bicep please? |
Generated via BicepBuild action.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resourceName can be up to 20 characters in length.
Key Vault has a limit of 24 characters for its name.
This means by adding UniqueString() as a suffix, we're going to run this risk of going over the limit. We should ensure that we don't go over 24 characters.
I think you'll need something like this..
var akvRawName = 'kv-${replace(resourceName, '-', '')}${uniqueString(resourceGroup().id, resourceName)}'
var akvName = length(akvRawName) > 24 ? substring(akvRawName ,0,23) : akvRawName
@aszego - thoughts?
Key Vault has a limit of 24 characters for its name. This means by adding UniqueString() as a suffix, we're going to run this risk of going over the limit. We should ensure that we don't go over 24 characters.
PR Summary
Key Vault's name must be unique across Azure, and previous naming didn't contain a call to
uniquestring()
.I use the same implementation as with acrName.
PR Checklist