Skip to content

Commit

Permalink
Disable cosmosdb local auth
Browse files Browse the repository at this point in the history
  • Loading branch information
sankur-codes committed Sep 20, 2024
1 parent 0657f6a commit dc2a28b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/deploy/assets/rp-development.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"defaultConsistencyLevel": "Strong"
},
"databaseAccountOfferType": "Standard",
"disableLocalAuth": true,
"locations": [
{
"locationName": "[resourceGroup().location]"
Expand Down
1 change: 1 addition & 0 deletions pkg/deploy/assets/rp-production.json
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,7 @@
},
"databaseAccountOfferType": "Standard",
"disableKeyBasedMetadataWriteAccess": true,
"disableLocalAuth": true,
"ipRules": "[if(parameters('disableCosmosDBFirewall'), createArray(), concat(parameters('ipRules'),createArray(createObject('ipAddressOrRange', '104.42.195.92'),createObject('ipAddressOrRange','40.76.54.131'),createObject('ipAddressOrRange','52.176.6.30'),createObject('ipAddressOrRange','52.169.50.45'),createObject('ipAddressOrRange','52.187.184.26'))))]",
"isVirtualNetworkFilterEnabled": "[not(parameters('disableCosmosDBFirewall'))]",
"locations": [
Expand Down
1 change: 1 addition & 0 deletions pkg/deploy/generator/resources_rp.go
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,7 @@ func (g *generator) rpCosmosDB() []*arm.Resource {
},
},
MinimalTLSVersion: &minTLSVersion,
DisableLocalAuth: to.BoolPtr(true), // Disable local authentication
},
Name: to.StringPtr("[parameters('databaseAccountName')]"),
Type: to.StringPtr("Microsoft.DocumentDB/databaseAccounts"),
Expand Down

0 comments on commit dc2a28b

Please sign in to comment.