Skip to content

Commit

Permalink
Fix off by one error when truncating name
Browse files Browse the repository at this point in the history
Now it truncates to 14 instead of 15. the corresponding arm templates
truncate to 15.
  • Loading branch information
Nont committed Apr 8, 2022
1 parent 4dbe573 commit 93c0bc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/util/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ func (c *Cluster) Create(ctx context.Context, vnetResourceGroup, clusterName str
if len(vnetResourceGroup) > 15 {
// keyvault names need to have a maximum length of 24,
// so we need to cut off some chars if the resource group name is too long
kvName = vnetResourceGroup[:14] + generator.SharedKeyVaultNameSuffix
kvName = vnetResourceGroup[:15] + generator.SharedKeyVaultNameSuffix
} else {
kvName = vnetResourceGroup + generator.SharedKeyVaultNameSuffix
}
Expand Down

0 comments on commit 93c0bc9

Please sign in to comment.