From 0e48f888ae152099ee7af1e2adecd35ac6528cf5 Mon Sep 17 00:00:00 2001 From: Grace Wilcox <43627800+gracewilcox@users.noreply.github.com> Date: Fri, 14 Jun 2024 15:47:22 -0700 Subject: [PATCH] [keyvault] update test-resources.json (#23078) * azcertificates * azsecrets --- .../azcertificates/test-resources.json | 176 ------------------ .../keyvault/azsecrets/test-resources.json | 176 ------------------ 2 files changed, 352 deletions(-) diff --git a/sdk/security/keyvault/azcertificates/test-resources.json b/sdk/security/keyvault/azcertificates/test-resources.json index 20f726f33227..1c5fc97b3be4 100644 --- a/sdk/security/keyvault/azcertificates/test-resources.json +++ b/sdk/security/keyvault/azcertificates/test-resources.json @@ -35,62 +35,18 @@ "description": "The location of the resource. By default, this is the same as the resource group." } }, - "hsmLocation": { - "type": "string", - "defaultValue": "southcentralus", - "allowedValues": [ - "australiacentral", - "canadacentral", - "centralus", - "eastasia", - "eastus2", - "koreacentral", - "northeurope", - "southafricanorth", - "southcentralus", - "southeastasia", - "switzerlandnorth", - "uksouth", - "westeurope", - "westus" - ], - "metadata": { - "description": "The location of the Managed HSM. By default, this is 'southcentralus'." - } - }, - "enableHsm": { - "type": "bool", - "defaultValue": false, - "metadata": { - "description": "Whether to enable deployment of Managed HSM. The default is false." - } - }, "keyVaultSku": { "type": "string", "defaultValue": "premium", "metadata": { "description": "Key Vault SKU to deploy. The default is 'premium'" } - }, - "attestationImage": { - "type": "string", - "defaultValue": "keyvault-mock-attestation:latest", - "metadata": { - "description": "The container image name and tag to use for the attestation mock service." - } } }, "variables": { - "attestationFarm": "[concat(parameters('baseName'), 'farm')]", - "attestationSite": "[concat(parameters('baseName'), 'site')]", - "attestationUri": "[concat('DOCKER|azsdkengsys.azurecr.io/', parameters('attestationImage'))]", "kvApiVersion": "2019-09-01", "kvName": "[parameters('baseName')]", - "hsmApiVersion": "2021-04-01-preview", - "hsmName": "[concat(parameters('baseName'), 'hsm')]", "mgmtApiVersion": "2019-04-01", - "blobContainerName": "backup", - "primaryAccountName": "[concat(parameters('baseName'), 'prim')]", "encryption": { "services": { "blob": { @@ -180,116 +136,6 @@ "enableSoftDelete": true, "softDeleteRetentionInDays": 7 } - }, - { - "type": "Microsoft.KeyVault/managedHSMs", - "apiVersion": "[variables('hsmApiVersion')]", - "name": "[variables('hsmName')]", - "condition": "[parameters('enableHsm')]", - "location": "[parameters('hsmLocation')]", - "sku": { - "family": "B", - "name": "Standard_B1" - }, - "properties": { - "tenantId": "[parameters('tenantId')]", - "initialAdminObjectIds": "[union(array(parameters('testApplicationOid')), array(parameters('provisionerApplicationOid')))]", - "enablePurgeProtection": false, - "enableSoftDelete": true, - "softDeleteRetentionInDays": 7, - "publicNetworkAccess": "Enabled", - "networkAcls": "[variables('networkAcls')]" - } - }, - { - "type": "Microsoft.Storage/storageAccounts", - "apiVersion": "[variables('mgmtApiVersion')]", - "name": "[variables('primaryAccountName')]", - "location": "[parameters('location')]", - "sku": { - "name": "Standard_RAGRS", - "tier": "Standard" - }, - "kind": "StorageV2", - "properties": { - "networkAcls": "[variables('networkAcls')]", - "supportsHttpsTrafficOnly": true, - "encryption": "[variables('encryption')]", - "accessTier": "Hot" - } - }, - { - "type": "Microsoft.Storage/storageAccounts/blobServices", - "apiVersion": "2019-06-01", - "name": "[concat(variables('primaryAccountName'), '/default')]", - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts', variables('primaryAccountName'))]" - ], - "sku": { - "name": "Standard_RAGRS", - "tier": "Standard" - }, - "properties": { - "cors": { - "corsRules": [] - }, - "deleteRetentionPolicy": { - "enabled": false - } - } - }, - { - "type": "Microsoft.Storage/storageAccounts/blobServices/containers", - "apiVersion": "2019-06-01", - "name": "[concat(variables('primaryAccountName'), '/default/', variables('blobContainerName'))]", - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts/blobServices', variables('primaryAccountName'), 'default')]", - "[resourceId('Microsoft.Storage/storageAccounts', variables('primaryAccountName'))]" - ], - "properties": { - "publicAccess": "None" - } - }, - { - - "type": "Microsoft.Web/serverfarms", - "apiVersion": "2020-12-01", - "name": "[variables('attestationFarm')]", - "condition": "[parameters('enableHsm')]", - "location": "[parameters('location')]", - "kind": "linux", - "sku": { - "name": "B1" - }, - "properties": { - "reserved": true - } - }, - { - - "type": "Microsoft.Web/sites", - "apiVersion": "2020-12-01", - "name": "[variables('attestationSite')]", - "condition": "[parameters('enableHsm')]", - "dependsOn": [ - "[resourceId('Microsoft.Web/serverfarms', variables('attestationFarm'))]" - ], - "location": "[parameters('location')]", - "properties": { - "httpsOnly": true, - "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('attestationFarm'))]", - "siteConfig": { - "name": "[variables('attestationSite')]", - "alwaysOn": true, - "linuxFxVersion": "[variables('attestationUri')]", - "appSettings": [ - { - "name": "WEBSITES_ENABLE_APP_SERVICE_STORAGE", - "value": "false" - } - ] - } - } } ], "outputs": { @@ -297,11 +143,6 @@ "type": "string", "value": "[reference(variables('kvName')).vaultUri]" }, - "AZURE_MANAGEDHSM_URL": { - "type": "string", - "condition": "[parameters('enableHsm')]", - "value": "[reference(variables('hsmName')).hsmUri]" - }, "KEYVAULT_SKU": { "type": "string", "value": "[reference(parameters('baseName')).sku.name]" @@ -309,23 +150,6 @@ "CLIENT_OBJECTID": { "type": "string", "value": "[parameters('testApplicationOid')]" - }, - "BLOB_STORAGE_ACCOUNT_NAME": { - "type": "string", - "value": "[variables('primaryAccountName')]" - }, - "BLOB_PRIMARY_STORAGE_ACCOUNT_KEY": { - "type": "string", - "value": "[listKeys(variables('primaryAccountName'), variables('mgmtApiVersion')).keys[0].value]" - }, - "BLOB_CONTAINER_NAME" : { - "type": "string", - "value": "[variables('blobContainerName')]" - }, - "AZURE_KEYVAULT_ATTESTATION_URL": { - "type": "string", - "condition": "[parameters('enableHsm')]", - "value": "[format('https://{0}/', reference(variables('attestationSite')).defaultHostName)]" } } } \ No newline at end of file diff --git a/sdk/security/keyvault/azsecrets/test-resources.json b/sdk/security/keyvault/azsecrets/test-resources.json index 20f726f33227..1c5fc97b3be4 100644 --- a/sdk/security/keyvault/azsecrets/test-resources.json +++ b/sdk/security/keyvault/azsecrets/test-resources.json @@ -35,62 +35,18 @@ "description": "The location of the resource. By default, this is the same as the resource group." } }, - "hsmLocation": { - "type": "string", - "defaultValue": "southcentralus", - "allowedValues": [ - "australiacentral", - "canadacentral", - "centralus", - "eastasia", - "eastus2", - "koreacentral", - "northeurope", - "southafricanorth", - "southcentralus", - "southeastasia", - "switzerlandnorth", - "uksouth", - "westeurope", - "westus" - ], - "metadata": { - "description": "The location of the Managed HSM. By default, this is 'southcentralus'." - } - }, - "enableHsm": { - "type": "bool", - "defaultValue": false, - "metadata": { - "description": "Whether to enable deployment of Managed HSM. The default is false." - } - }, "keyVaultSku": { "type": "string", "defaultValue": "premium", "metadata": { "description": "Key Vault SKU to deploy. The default is 'premium'" } - }, - "attestationImage": { - "type": "string", - "defaultValue": "keyvault-mock-attestation:latest", - "metadata": { - "description": "The container image name and tag to use for the attestation mock service." - } } }, "variables": { - "attestationFarm": "[concat(parameters('baseName'), 'farm')]", - "attestationSite": "[concat(parameters('baseName'), 'site')]", - "attestationUri": "[concat('DOCKER|azsdkengsys.azurecr.io/', parameters('attestationImage'))]", "kvApiVersion": "2019-09-01", "kvName": "[parameters('baseName')]", - "hsmApiVersion": "2021-04-01-preview", - "hsmName": "[concat(parameters('baseName'), 'hsm')]", "mgmtApiVersion": "2019-04-01", - "blobContainerName": "backup", - "primaryAccountName": "[concat(parameters('baseName'), 'prim')]", "encryption": { "services": { "blob": { @@ -180,116 +136,6 @@ "enableSoftDelete": true, "softDeleteRetentionInDays": 7 } - }, - { - "type": "Microsoft.KeyVault/managedHSMs", - "apiVersion": "[variables('hsmApiVersion')]", - "name": "[variables('hsmName')]", - "condition": "[parameters('enableHsm')]", - "location": "[parameters('hsmLocation')]", - "sku": { - "family": "B", - "name": "Standard_B1" - }, - "properties": { - "tenantId": "[parameters('tenantId')]", - "initialAdminObjectIds": "[union(array(parameters('testApplicationOid')), array(parameters('provisionerApplicationOid')))]", - "enablePurgeProtection": false, - "enableSoftDelete": true, - "softDeleteRetentionInDays": 7, - "publicNetworkAccess": "Enabled", - "networkAcls": "[variables('networkAcls')]" - } - }, - { - "type": "Microsoft.Storage/storageAccounts", - "apiVersion": "[variables('mgmtApiVersion')]", - "name": "[variables('primaryAccountName')]", - "location": "[parameters('location')]", - "sku": { - "name": "Standard_RAGRS", - "tier": "Standard" - }, - "kind": "StorageV2", - "properties": { - "networkAcls": "[variables('networkAcls')]", - "supportsHttpsTrafficOnly": true, - "encryption": "[variables('encryption')]", - "accessTier": "Hot" - } - }, - { - "type": "Microsoft.Storage/storageAccounts/blobServices", - "apiVersion": "2019-06-01", - "name": "[concat(variables('primaryAccountName'), '/default')]", - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts', variables('primaryAccountName'))]" - ], - "sku": { - "name": "Standard_RAGRS", - "tier": "Standard" - }, - "properties": { - "cors": { - "corsRules": [] - }, - "deleteRetentionPolicy": { - "enabled": false - } - } - }, - { - "type": "Microsoft.Storage/storageAccounts/blobServices/containers", - "apiVersion": "2019-06-01", - "name": "[concat(variables('primaryAccountName'), '/default/', variables('blobContainerName'))]", - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts/blobServices', variables('primaryAccountName'), 'default')]", - "[resourceId('Microsoft.Storage/storageAccounts', variables('primaryAccountName'))]" - ], - "properties": { - "publicAccess": "None" - } - }, - { - - "type": "Microsoft.Web/serverfarms", - "apiVersion": "2020-12-01", - "name": "[variables('attestationFarm')]", - "condition": "[parameters('enableHsm')]", - "location": "[parameters('location')]", - "kind": "linux", - "sku": { - "name": "B1" - }, - "properties": { - "reserved": true - } - }, - { - - "type": "Microsoft.Web/sites", - "apiVersion": "2020-12-01", - "name": "[variables('attestationSite')]", - "condition": "[parameters('enableHsm')]", - "dependsOn": [ - "[resourceId('Microsoft.Web/serverfarms', variables('attestationFarm'))]" - ], - "location": "[parameters('location')]", - "properties": { - "httpsOnly": true, - "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('attestationFarm'))]", - "siteConfig": { - "name": "[variables('attestationSite')]", - "alwaysOn": true, - "linuxFxVersion": "[variables('attestationUri')]", - "appSettings": [ - { - "name": "WEBSITES_ENABLE_APP_SERVICE_STORAGE", - "value": "false" - } - ] - } - } } ], "outputs": { @@ -297,11 +143,6 @@ "type": "string", "value": "[reference(variables('kvName')).vaultUri]" }, - "AZURE_MANAGEDHSM_URL": { - "type": "string", - "condition": "[parameters('enableHsm')]", - "value": "[reference(variables('hsmName')).hsmUri]" - }, "KEYVAULT_SKU": { "type": "string", "value": "[reference(parameters('baseName')).sku.name]" @@ -309,23 +150,6 @@ "CLIENT_OBJECTID": { "type": "string", "value": "[parameters('testApplicationOid')]" - }, - "BLOB_STORAGE_ACCOUNT_NAME": { - "type": "string", - "value": "[variables('primaryAccountName')]" - }, - "BLOB_PRIMARY_STORAGE_ACCOUNT_KEY": { - "type": "string", - "value": "[listKeys(variables('primaryAccountName'), variables('mgmtApiVersion')).keys[0].value]" - }, - "BLOB_CONTAINER_NAME" : { - "type": "string", - "value": "[variables('blobContainerName')]" - }, - "AZURE_KEYVAULT_ATTESTATION_URL": { - "type": "string", - "condition": "[parameters('enableHsm')]", - "value": "[format('https://{0}/', reference(variables('attestationSite')).defaultHostName)]" } } } \ No newline at end of file