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

Noise Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/throughputSettings : throughput when autoscaleSettings are set #386

Open
dj-r1 opened this issue Dec 31, 2024 · 0 comments

Comments

@dj-r1
Copy link

dj-r1 commented Dec 31, 2024

Describe the noise

Resource type
Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/throughputSettings

apiVersion
2024-05-15

Client (PowerShell, Azure CLI, or API)
PowerShell

Relevant Bicep code

resource mongoDbThroughputSettings 'Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/throughputSettings@2024-05-15' = {
  name: 'default'
  parent: mongoDb
  properties: {
    resource: {
      autoscaleSettings: {
        maxThroughput: 10000
      }
    }
  }
}

Expected response

{
  "apiVersion": "2024-05-15",
  "id": "/subscriptions/0000bb0-000b-0bb0-0000-bb00b0b0b00/resourceGroups/my-rg/providers/Microsoft.DocumentDB/databaseAccounts/my-cosmosdb-account/mongodbDatabases/my-mongodb/throughputSettings/default",
  "name": "default",
  "properties": {
    "resource": {
      "autoscaleSettings": {
        "maxThroughput": 10000
      }
    }
  },
  "type": "Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/throughputSettings"
}

Current (noisy) response

{
  "apiVersion": "2024-05-15",
  "id": "/subscriptions/0000bb0-000b-0bb0-0000-bb00b0b0b00/resourceGroups/my-rg/providers/Microsoft.DocumentDB/databaseAccounts/my-cosmosdb-account/mongodbDatabases/my-mongodb/throughputSettings/default",
  "name": "default",
  "properties": {
    "resource": {
      "autoscaleSettings": {
        "maxThroughput": 10000
      },
      "throughput": 1000
    }
  },
  "type": "Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/throughputSettings"
}

Additional context
WhatIf should not output parameter actual throughput when autoscaleSettings (with maxThroughput) are specified in ThroughputSettingsResourceOrThroughputSettingsGetPropertiesResource Azure documentation as

Value of the Cosmos DB resource throughput. Either throughput is required or autoscaleSettings is required, but not both.

So "throughput": 1000 modify change is a noise. Such parameter can't be specified in ARM template (Bicep) in the scenario with autoscaleSettings.

P.S.
To reproduce the issue be aware that during initial provisioning autoscaleSettings must be present in MongoDb resource due to 'Cannot set throughput for database that is not created with throughput'. With second deployment throughput settings may specified with extension-extension resource (throughputSettings), but can't be added in the initial deployment (issue #58213 azure-docs).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant