Skip to content

[AVM Module Issue]: Provider constraint conflict: hashicorp/random cannot be resolved in mixed AVM composition (VM + Disk + DES + UAI) #244

@BasVeenendaal

Description

@BasVeenendaal

Check for previous/existing GitHub issues

  • I have checked 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

  1. Compose the modules above in one stack.
  2. Run terraform init.
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions