-
Notifications
You must be signed in to change notification settings - Fork 526
Open
Labels
Class: Resource Module 📦This is a resource moduleThis is a resource moduleType: AVM 🅰️ ✌️ Ⓜ️This is an AVM related issueThis is an AVM related issueType: Bug 🐛Something isn't workingSomething isn't working
Description
Check for previous/existing GitHub issues
- I have checked for previous/existing GitHub issues
Issue Type?
Bug
Module Name
avm/res/kusto/cluster
(Optional) Module Version
0.9.0
Description
Issue
When deploying a Kusto Cluster and Database in a region that is different than the region set on the Resource Group, the deployment fails.
Repro Steps
- Resource Group deployed in westus
- Using the AVM module, attempt to deploy a Kusto cluster in eastus with a single database
Expected
- Kusto Cluster deploys in eastus
- Kusto Database deploys in eastus
Actual
- Kusto Cluster deploys in eastus
- Kusto Database attempts to deploy to westus due to Resource Group location instead of eastus based on cluster location.
Reason for failure
The location parameter set on the cluster is not passed down to the database. Instead, the database defaults to the Resource Group's location. The database.bicep file already exposes a location parameter, so I believe all that is needed is to pass the location from the cluster to the database. Example of code change required.
module kustoCluster_databases 'database/main.bicep' = [
for (database, index) in (databases ?? []): {
name: '${uniqueString(deployment().name, location)}-kustoCluster-database-${index}'
params: {
name: database.name
kustoClusterName: kustoCluster.name
location: location
databaseKind: database.kind
databaseReadWriteProperties: database.kind == 'ReadWrite' ? database.readWriteProperties : null
databasePrincipalAssignments: database.databasePrincipalAssignments
}
}
]
Example diff: main...StevenU8:bicep-registry-modules:patch-1
(Optional) Correlation Id
No response
Metadata
Metadata
Assignees
Labels
Class: Resource Module 📦This is a resource moduleThis is a resource moduleType: AVM 🅰️ ✌️ Ⓜ️This is an AVM related issueThis is an AVM related issueType: Bug 🐛Something isn't workingSomething isn't working
Type
Projects
Status
In Development