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

Zone redunacy picker #15987

Open
Gijsreyn opened this issue Dec 31, 2024 · 2 comments
Open

Zone redunacy picker #15987

Gijsreyn opened this issue Dec 31, 2024 · 2 comments
Labels
enhancement New feature or request Needs: Triage 🔍

Comments

@Gijsreyn
Copy link

As a user, I would like the ability to pick the zone related to the redunacy. It's better to explain it by example. Imagine the following Bicep file:

module cosmosDb 'br/public:avm/res/document-db/database-account:0.10.1' = {
  name: 'cosmosDb'
  params: {
    name: cosmosDbName
    location: 'westus'
    disableLocalAuth: true
    networkRestrictions: {
      publicNetworkAccess: 'Enabled'
      networkAclBypass: 'AzureServices'
      ipRules: [
        '13.91.105.215'
        '4.210.172.107'
        '13.88.56.148'
        '40.91.218.243'
        '0.0.0.0'
      ]
    }
    locations: [
        {
            failoverPriority: 0
            locationName: 'West US'
            isZoneRedundant: false
        }
        {
            failoverPriority: 1
            locationName: 'Central US'
            isZoneRedundant: false
        }
    ]
    enableFreeTier: false
    databaseAccountOfferType: 'Standard'
    backupPolicyType: 'Periodic'
    backupIntervalInMinutes: 240
    backupRetentionIntervalInHours: 720
    backupStorageRedundancy: 'Geo'
    defaultConsistencyLevel: 'Session'
    maxStalenessPrefix: 100
    maxIntervalInSeconds: 5
    sqlDatabases: [
      {
        name: 'test'
          }
        ]
      }
    ]
  }
}

The location parameter can be set, which takes me to the locations parameter. For the failover priority, I can use: pickZones('Microsoft.DocumentDB', 'databaseAccounts', location). The challenge is in the second part. It would be beneficial if there were a function like: pickZoneReferenceName('Microsoft.DocumentDB', 'databaseAccounts', location).

If this issue has already been captured or if such a function exists, I hope you can steer me in the right direction.

@jeskew
Copy link
Contributor

jeskew commented Dec 31, 2024

@Gijsreyn what value would pickZoneReferenceName return? Is it the location name?

@Gijsreyn
Copy link
Author

Gijsreyn commented Jan 1, 2025

Hey @jeskew, depending on the scenario, it should be able to return the location name in short or long e.g. westus or West US.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Needs: Triage 🔍
Projects
Status: Todo
Development

No branches or pull requests

2 participants