Check for previous/existing GitHub issues
Issue Type?
Bug
(Optional) Module Version
No response
(Optional) Correlation Id
No response
Description
Summary
When composing Azure/avm-res-compute-virtualmachine with Azure/avm-res-compute-disk, Azure/avm-res-compute-diskencryptionset, and Azure/avm-res-managedidentity-userassignedidentity, terraform init fails to resolve hashicorp/random due to incompatible version constraints.
Affected modules and versions
- Azure/avm-res-compute-virtualmachine: 0.20.0
- Azure/avm-res-compute-disk: 0.3.2
- Azure/avm-res-compute-diskencryptionset: 0.1.1
- Azure/avm-res-managedidentity-userassignedidentity: 0.5.0
Current constraints observed
- VM module: random ~> 3.7
- Disk module: random ~> 3.6.2
- DiskEncryptionSet module: random ~> 3.5
- UserAssignedIdentity module: random ~> 3.5
Repro
- Compose the modules above in one stack.
- Run terraform init.
- Observe provider resolution failure for hashicorp/random.
Actual result
terraform init fails with:
Could not retrieve the list of available versions for provider hashicorp/random: no available releases match the given constraints ... ~> 3.6.2 ... ~> 3.7 ...
Expected result
terraform init should resolve a single hashicorp/random version compatible across modules.
Proposed fix
In Azure/avm-res-compute-virtualmachine terraform.tf, relax random from:
- ~> 3.7
to:
- = 3.6.2, < 5.0.0
This keeps a safe upper major bound and restores compatibility with existing module constraints in common mixed deployments.
Check for previous/existing GitHub issues
Issue Type?
Bug
(Optional) Module Version
No response
(Optional) Correlation Id
No response
Description
Summary
When composing Azure/avm-res-compute-virtualmachine with Azure/avm-res-compute-disk, Azure/avm-res-compute-diskencryptionset, and Azure/avm-res-managedidentity-userassignedidentity, terraform init fails to resolve hashicorp/random due to incompatible version constraints.
Affected modules and versions
Current constraints observed
Repro
Actual result
terraform init fails with:
Could not retrieve the list of available versions for provider hashicorp/random: no available releases match the given constraints ... ~> 3.6.2 ... ~> 3.7 ...
Expected result
terraform init should resolve a single hashicorp/random version compatible across modules.
Proposed fix
In Azure/avm-res-compute-virtualmachine terraform.tf, relax random from:
to:
This keeps a safe upper major bound and restores compatibility with existing module constraints in common mixed deployments.