github_repo_scraped
/
repos
/Azure-azure-sdk-for-python-c89899b
/common
/smoketest
/test-resources.json
{ | |
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"location": { | |
"type": "string", | |
"defaultValue": "[resourceGroup().location]" | |
}, | |
"baseName": { | |
"type": "string" | |
}, | |
"testApplicationId": { | |
"type": "string" | |
}, | |
"testApplicationSecret": { | |
"type": "string" | |
}, | |
"testApplicationOid": { | |
"type": "string" | |
}, | |
"tenantId": { | |
"type": "string" | |
}, | |
"storageEndpointSuffix": { | |
"type": "string" | |
}, | |
"azureCloud": { | |
"type": "string" | |
} | |
}, | |
"variables": { | |
"keyVaultName": "[format('kv-smk-{0}', parameters('baseName'))]", | |
"eventHubNamespaceName": "[format('eh-smoke-{0}', parameters('baseName'))]", | |
"eventHubName": "myeventhub", | |
"eventHubAuthorizationRuleName": "RootManageSharedAccessKey", | |
"storageAccountName": "[format('stsmoke{0}', parameters('baseName'))]" | |
}, | |
"resources": [ | |
{ | |
"type": "Microsoft.EventHub/namespaces", | |
"apiVersion": "2018-01-01-preview", | |
"name": "[variables('eventHubNamespaceName')]", | |
"location": "[parameters('location')]", | |
"sku": { | |
"name": "Basic", | |
"tier": "Basic", | |
"capacity": 1 | |
}, | |
"properties": { | |
"zoneRedundant": false, | |
"isAutoInflateEnabled": false, | |
"maximumThroughputUnits": 0, | |
"kafkaEnabled": false | |
} | |
}, | |
{ | |
"type": "Microsoft.KeyVault/vaults", | |
"apiVersion": "2016-10-01", | |
"name": "[variables('keyVaultName')]", | |
"location": "[parameters('location')]", | |
"properties": { | |
"sku": { | |
"family": "A", | |
"name": "standard" | |
}, | |
"tenantId": "[parameters('tenantId')]", | |
"accessPolicies": [ | |
{ | |
"tenantId": "[parameters('tenantId')]", | |
"objectId": "[parameters('testApplicationOid')]", | |
"permissions": { | |
"keys": [ | |
"backup", | |
"create", | |
"decrypt", | |
"delete", | |
"encrypt", | |
"get", | |
"import", | |
"list", | |
"purge", | |
"recover", | |
"restore", | |
"sign", | |
"unwrapKey", | |
"update", | |
"verify", | |
"wrapKey" | |
], | |
"secrets": [ | |
"backup", | |
"delete", | |
"get", | |
"list", | |
"purge", | |
"recover", | |
"restore", | |
"set" | |
], | |
"certificates": [ | |
"backup", | |
"create", | |
"delete", | |
"deleteissuers", | |
"get", | |
"getissuers", | |
"import", | |
"list", | |
"listissuers", | |
"managecontacts", | |
"manageissuers", | |
"purge", | |
"recover", | |
"restore", | |
"setissuers", | |
"update" | |
] | |
} | |
} | |
], | |
"enabledForDeployment": false, | |
"enabledForDiskEncryption": false, | |
"enabledForTemplateDeployment": false | |
} | |
}, | |
{ | |
"type": "Microsoft.Storage/storageAccounts", | |
"apiVersion": "2019-06-01", | |
"name": "[variables('storageAccountName')]", | |
"location": "[parameters('location')]", | |
"sku": { | |
"name": "Standard_RAGRS", | |
"tier": "Standard" | |
}, | |
"kind": "StorageV2", | |
"properties": { | |
"networkAcls": { | |
"bypass": "AzureServices", | |
"virtualNetworkRules": [], | |
"ipRules": [], | |
"defaultAction": "Allow" | |
}, | |
"supportsHttpsTrafficOnly": true, | |
"encryption": { | |
"services": { | |
"file": { | |
"keyType": "Account", | |
"enabled": true | |
}, | |
"blob": { | |
"keyType": "Account", | |
"enabled": true | |
} | |
}, | |
"keySource": "Microsoft.Storage" | |
}, | |
"accessTier": "Hot" | |
} | |
}, | |
{ | |
"type": "Microsoft.EventHub/namespaces/AuthorizationRules", | |
"apiVersion": "2017-04-01", | |
"name": "[format('{0}/{1}', variables('eventHubNamespaceName'), variables('eventHubAuthorizationRuleName'))]", | |
"location": "[parameters('location')]", | |
"dependsOn": [ | |
"[resourceId('Microsoft.EventHub/namespaces', variables('eventHubNamespaceName'))]" | |
], | |
"properties": { | |
"rights": [ | |
"Listen", | |
"Manage", | |
"Send" | |
] | |
} | |
}, | |
{ | |
"type": "Microsoft.EventHub/namespaces/eventhubs", | |
"apiVersion": "2017-04-01", | |
"name": "[format('{0}/{1}', variables('eventHubNamespaceName'), variables('eventHubName'))]", | |
"location": "[parameters('location')]", | |
"dependsOn": [ | |
"[resourceId('Microsoft.EventHub/namespaces', variables('eventHubNamespaceName'))]" | |
], | |
"properties": { | |
"messageRetentionInDays": 1, | |
"partitionCount": 2, | |
"status": "Active" | |
} | |
}, | |
{ | |
"type": "Microsoft.Storage/storageAccounts/blobServices", | |
"apiVersion": "2019-06-01", | |
"name": "[concat(variables('storageAccountName'), '/default')]", | |
"dependsOn": [ | |
"[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]" | |
], | |
"sku": { | |
"name": "Standard_RAGRS" | |
}, | |
"properties": { | |
"cors": { | |
"corsRules": [] | |
}, | |
"deleteRetentionPolicy": { | |
"enabled": false | |
} | |
} | |
}, | |
{ | |
"type": "Microsoft.EventHub/namespaces/eventhubs/authorizationRules", | |
"apiVersion": "2017-04-01", | |
"name": "[concat(variables('eventHubNamespaceName'), '/myeventhub/Test')]", | |
"location": "[parameters('location')]", | |
"dependsOn": [ | |
"[resourceId('Microsoft.EventHub/namespaces/eventhubs', variables('eventHubNamespaceName'), 'myeventhub')]", | |
"[resourceId('Microsoft.EventHub/namespaces', variables('eventHubNamespaceName'))]" | |
], | |
"properties": { | |
"rights": [ | |
"Manage", | |
"Listen", | |
"Send" | |
] | |
} | |
}, | |
{ | |
"type": "Microsoft.Storage/storageAccounts/blobServices/containers", | |
"apiVersion": "2019-06-01", | |
"name": "[concat(variables('storageAccountName'), '/default/mycontainer')]", | |
"dependsOn": [ | |
"[resourceId('Microsoft.Storage/storageAccounts/blobServices', variables('storageAccountName'), 'default')]", | |
"[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]" | |
], | |
"properties": { | |
"publicAccess": "None" | |
} | |
} | |
], | |
"outputs": { | |
"AZURE_TENANT_ID": { | |
"type": "string", | |
"value": "[parameters('tenantId')]" | |
}, | |
"AZURE_CLIENT_ID": { | |
"type": "string", | |
"value": "[parameters('testApplicationId')]" | |
}, | |
"AZURE_CLIENT_SECRET": { | |
"type": "string", | |
"value": "[parameters('testApplicationSecret')]" | |
}, | |
"AZURE_CLOUD": { | |
"type": "string", | |
"value": "[parameters('azureCloud')]" | |
}, | |
"AZURE_PROJECT_URL": { | |
"type": "string", | |
"value": "[reference(variables('keyVaultName')).vaultUri]" | |
}, | |
"EVENT_HUBS_CONNECTION_STRING": { | |
"type": "string", | |
"value": "[listKeys(resourceId('Microsoft.EventHub/namespaces/eventhubs/authorizationRules', variables('eventHubNamespaceName'), variables('eventHubName'), 'Test'), '2017-04-01').primaryConnectionString]" | |
}, | |
"STORAGE_CONNECTION_STRING": { | |
"type": "string", | |
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2019-06-01').keys[0].value, ';EndpointSuffix=', parameters('storageEndpointSuffix'))]" | |
} | |
} | |
} |