Skip to content

Commit

Permalink
Add Azure Search example (#1025)
Browse files Browse the repository at this point in the history
* Add azure search example

* Update main.bicep
  • Loading branch information
MCKLMT authored Nov 30, 2020
1 parent 025dafc commit e476363
Show file tree
Hide file tree
Showing 2 changed files with 129 additions and 0 deletions.
58 changes: 58 additions & 0 deletions docs/examples/101/azure-search-create/main.bicep
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
param name string {
minLength: 2
maxLength: 60
}

param sku string {
default: 'standard'
allowed: [
'free'
'basic'
'standard'
'standard2'
'standard3'
'storage_optimized_l1'
'storage_optimized_l2'
]
}

param replicaCount int {
default: 1
minValue: 1
maxValue: 12
}

param partitionCount int {
default: 1
allowed: [
1
2
3
4
6
12
]
}

param hostingMode string {
default: 'default'
allowed: [
'default'
'highDensity'
]
}

param location string = resourceGroup().location

resource search 'Microsoft.Search/searchServices@2020-08-01' = {
name: name
location: location
sku: {
name: sku
}
properties: {
replicaCount: replicaCount
partitionCount: partitionCount
hostingMode: hostingMode
}
}
71 changes: 71 additions & 0 deletions docs/examples/101/azure-search-create/main.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"name": {
"type": "string",
"minLength": 2,
"maxLength": 60
},
"sku": {
"type": "string",
"defaultValue": "standard",
"allowedValues": [
"free",
"basic",
"standard",
"standard2",
"standard3",
"storage_optimized_l1",
"storage_optimized_l2"
]
},
"replicaCount": {
"type": "int",
"minValue": 1,
"maxValue": 12,
"defaultValue": 1
},
"partitionCount": {
"type": "int",
"defaultValue": 1,
"allowedValues": [
1,
2,
3,
4,
6,
12
]
},
"hostingMode": {
"type": "string",
"defaultValue": "default",
"allowedValues": [
"default",
"highDensity"
]
},
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]"
}
},
"functions": [],
"resources": [
{
"type": "Microsoft.Search/searchServices",
"apiVersion": "2020-08-01",
"name": "[parameters('name')]",
"location": "[parameters('location')]",
"sku": {
"name": "[parameters('sku')]"
},
"properties": {
"replicaCount": "[parameters('replicaCount')]",
"partitionCount": "[parameters('partitionCount')]",
"hostingMode": "[parameters('hostingMode')]"
}
}
]
}

0 comments on commit e476363

Please sign in to comment.