Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Azure/azure-sdk-for-java
Browse files Browse the repository at this point in the history
  • Loading branch information
Hemant Tanwar committed Jun 28, 2020
2 parents e4c98cc + 78d2941 commit 964c1b6
Show file tree
Hide file tree
Showing 62 changed files with 1,487 additions and 1,447 deletions.
3 changes: 3 additions & 0 deletions eng/pipelines/templates/jobs/archetype-sdk-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ jobs:
# Default $(SubscriptionConfiguration) if the matrix does not specify a $(SubscriptionConfiguration)
- name: SubscriptionConfiguration
value: $(sub-config-azure-cloud-test-resources)
- name: ArmTemplateParameters
value: '@{}'

strategy:
matrix: ${{ parameters.Matrix }}
Expand All @@ -82,6 +84,7 @@ jobs:
parameters:
ServiceDirectory: '${{ parameters.ServiceDirectory }}'
SubscriptionConfiguration: $(SubscriptionConfiguration)
ArmTemplateParameters: $(ArmTemplateParameters)

- ${{ parameters.PreRunSteps }}

Expand Down
98 changes: 98 additions & 0 deletions sdk/cosmos/test-resources.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"baseName": {
"type": "string"
},
"enableMultipleWriteLocations" : {
"type": "bool",
"metadata": {
"description": "Flag to enable or disable multiple write locations on CosmosDB Account"
}
},
"defaultConsistencyLevel": {
"type": "string",
"metadata": {
"description": "Default Cosmosdb Account level consistency"
}
},
"enableMultipleRegions": {
"type": "bool",
"metadata": {
"description": "Enable multiple regions, default value is false"
},
"defaultValue": false
}
},
"variables": {
"apiVersion": "2020-04-01",
"accountName": "[toLower(parameters('baseName'))]",
"resourceId": "[resourceId('Microsoft.DocumentDB/databaseAccounts', variables('accountName'))]",
"singleRegionConfiguration": [
{
"locationName": "East US 2",
"provisioningState": "Succeeded",
"failoverPriority": 0,
"isZoneRedundant": false
}],
"multiRegionConfiguration": [
{
"locationName": "East US 2",
"provisioningState": "Succeeded",
"failoverPriority": 0,
"isZoneRedundant": false
},
{
"locationName": "East US",
"provisioningState": "Succeeded",
"failoverPriority": 1,
"isZoneRedundant": false
}
],
"locationsConfiguration": "[if(parameters('enableMultipleRegions'), variables('multiRegionConfiguration'), variables('singleRegionConfiguration'))]"

},
"resources": [
{
"type": "Microsoft.DocumentDB/databaseAccounts",
"apiVersion": "[variables('apiVersion')]",
"name": "[variables('accountName')]",
"location": "[resourceGroup().location]",
"kind": "GlobalDocumentDB",
"properties": {
"publicNetworkAccess": "Enabled",
"enableAutomaticFailover": false,
"enableMultipleWriteLocations": "[parameters('enableMultipleWriteLocations')]",
"isVirtualNetworkFilterEnabled": false,
"virtualNetworkRules": [],
"disableKeyBasedMetadataWriteAccess": false,
"enableFreeTier": false,
"enableAnalyticalStorage": false,
"databaseAccountOfferType": "Standard",
"consistencyPolicy": {
"defaultConsistencyLevel": "[parameters('defaultConsistencyLevel')]",
"maxIntervalInSeconds": 5,
"maxStalenessPrefix": 100
},
"locations": "[variables('locationsConfiguration')]",
"capabilities": [],
"ipRules": []
}
}
],
"outputs": {
"ACCOUNT_HOST": {
"type": "string",
"value": "[reference(variables('resourceId'), variables('apiVersion')).documentEndpoint]"
},
"ACCOUNT_KEY": {
"type": "string",
"value": "[listKeys(variables('resourceId'), variables('apiVersion')).primaryMasterKey]"
},
"SECONDARY_ACCOUNT_KEY": {
"type": "string",
"value": "[listKeys(variables('resourceId'), variables('apiVersion')).secondaryMasterKey]"
}
}
}
Loading

0 comments on commit 964c1b6

Please sign in to comment.