Azure / ARO-RP

Azure Red Hat OpenShift RP

Home Page:https://azure.microsoft.com/products/openshift/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Off by one error resource group name truncation during shared dev provisioning

nwnt opened this issue · comments

commented

Found this when following prepare a shared rp development

When I have $RESOURCEGROUP that's longer than 15 characters, it's truncated to 15 in deploy/env-development.json when provisioning the KVs. Below is an example from deploy/env-development.json:

        {
            "name": "[concat(concat(take(resourceGroup().name,15), '-sharedKV'), '/add')]",
            "type": "Microsoft.KeyVault/vaults/accessPolicies",

But when running make runlocal-rp, I'd get errors saying it couldn't find the provisioned KVs. This is because the code currently truncates the name to just 14 characters. Here is the location in the code

kvName = vnetResourceGroup[:14] + generator.SharedKeyVaultNameSuffix