Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements #53

Merged
merged 4 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ AZURE_OPENAI_ENDPOINT="https://<YOUR-OPENAI-DEPLOYMENT-NAME>.openai.azure.com/"
AZURE_OPENAI_API_KEY="<YOUR-DEPLOYMENT-KEY>"
# Environment variable obtained from Azure Cosmos DB for MongoDB vCore
AZURE_COSMOS_CONNECTION_STRING="<YOUR-COSMOS-DB-CONNECTION-STRING>"
AZURE_COSMOS_USERNAME="<YOUR-COSMOS-DB-USERNAME>"
AZURE_COSMOS_PASSWORD="<YOUR-COSMOS-DB-PASSWORD>"
# Environment variables you set to be used by the code
AZURE_COSMOS_DATABASE_NAME="<COSMOS-DB-NEW-UNIQUE-DATABASE-NAME>"
AZURE_COSMOS_COLLECTION_NAME="<COSMOS-DB-NEW-UNIQUE-COLLECTION-NAME>"
Expand Down
30 changes: 23 additions & 7 deletions infra/core/database/cosmos/mongo/cosmos-mongo-cluster.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,45 @@ param name string
param location string = resourceGroup().location
param tags object = {}

@description('Username for admin user')
param administratorLogin string
param sku string
param storage int
param nodeCount int
@secure()
@description('Password for admin user')
@minLength(8)
@maxLength(128)
param administratorLoginPassword string
param highAvailabilityMode bool = false
param allowAzureIPsFirewall bool = false
@description('Whether to allow all IPs or not. Warning: No IP addresses will be blocked and any host on the Internet can access the coordinator in this server group. It is strongly recommended to use this rule only temporarily and only on test clusters that do not contain sensitive data.')
param allowAllIPsFirewall bool = false
@description('Whether to allow Azure internal IPs or not')
param allowAzureIPsFirewall bool = false
@description('IP addresses to allow access to the cluster from')
param allowedSingleIPs array = []
@description('Mode to create the mongo cluster')
param createMode string = 'Default'
@description('Whether high availability is enabled on the node group')
param highAvailabilityMode bool = false
@description('Number of nodes in the node group')
param nodeCount int
@description('Deployed Node type in the node group')
param nodeType string = 'Shard'
@description('SKU defines the CPU and memory that is provisioned for each node')
param sku string
@description('Disk storage size for the node group in GB')
param storage int

resource mognoCluster 'Microsoft.DocumentDB/mongoClusters@2023-03-01-preview' = {
resource mognoCluster 'Microsoft.DocumentDB/mongoClusters@2024-02-15-preview' = {
name: name
tags: tags
location: location
properties: {
administratorLogin: administratorLogin
administratorLoginPassword: administratorLoginPassword
createMode: createMode
nodeGroupSpecs: [
{
diskSizeGB: storage
enableHa: highAvailabilityMode
kind: 'Shard'
kind: nodeType
nodeCount: nodeCount
sku: sku
}
Expand Down
65 changes: 0 additions & 65 deletions infra/core/database/mysql/flexibleserver.bicep

This file was deleted.

49 changes: 0 additions & 49 deletions infra/core/database/postgresql/aca-service.bicep

This file was deleted.

64 changes: 0 additions & 64 deletions infra/core/database/postgresql/flexibleserver.bicep

This file was deleted.

129 changes: 0 additions & 129 deletions infra/core/database/sqlserver/sqlserver.bicep

This file was deleted.

Loading
Loading