Skip to content

Commit

Permalink
add function and template to deploy e2e global keyvault
Browse files Browse the repository at this point in the history
  • Loading branch information
tony-schndr committed Jun 5, 2024
1 parent 8358c32 commit f98328e
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 3 deletions.
11 changes: 8 additions & 3 deletions hack/devtools/deploy-shared-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,14 @@ deploy_aro_spn_keyvault() {
--template-file pkg/deploy/assets/e2e-aro-spn-keyvault.json
}

deploy_aro_spns() {
# Create ARO cluster service principals

deploy_aro_e2e_global_keyvault() {
az deployment group create \
--name aroe2eprincipals \
--resource-group global-infra \
--parameters \
"vault_name=$ARO_E2E_GLOBAL_VAULT_NAME" \
"tenant_id=$AZURE_TENANT_ID" \
--template-file pkg/deploy/assets/e2e-global-keyvault.json

}

Expand Down
40 changes: 40 additions & 0 deletions pkg/deploy/assets/e2e-global-keyvault.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"vault_name": {
"defaultValue": "",
"type": "String"
},
"tenant_id": {
"defaultValue": "",
"type": "String"
}
},
"variables": {},
"resources": [
{
"type": "Microsoft.KeyVault/vaults",
"apiVersion": "2023-07-01",
"name": "[parameters('vault_name')]",
"location": "eastus",
"properties": {
"sku": {
"family": "A",
"name": "standard"
},
"tenantId": "[parameters('tenant_id')]",
"accessPolicies": [],
"enabledForDeployment": false,
"enabledForDiskEncryption": false,
"enabledForTemplateDeployment": false,
"enableSoftDelete": true,
"softDeleteRetentionInDays": 90,
"enableRbacAuthorization": false,
"vaultUri": "[concat('https://', parameters('vault_name'), '.vault.azure.net/')]",
"provisioningState": "Succeeded",
"publicNetworkAccess": "Enabled"
}
}
]
}

0 comments on commit f98328e

Please sign in to comment.