hashicorp / terraform-provider-vsphere

Terraform Provider for VMware vSphere
https://registry.terraform.io/providers/hashicorp/vsphere/
Mozilla Public License 2.0
611 stars 450 forks source link

VMFS datastore not mounting on all cluster hosts #2128

Open rmtilson opened 6 months ago

rmtilson commented 6 months ago

Community Guidelines

Terraform

v1.6.2

Terraform Provider

v2.6.1

VMware vSphere

v7.0.3

Description

Datastore only mounted to host that was specified and not the other hosts in the cluster.

Affected Resources or Data Sources

vsphere_vmfs_datastore

Terraform Configuration

resource "vsphere_vmfs_datastore" "datastore" {
  for_each   = var.datastores

  name           = each.key
  host_system_id = module.vsphere_host[var.ds_mount_host].vmw_host_id

  datastore_cluster_id = try(vsphere_datastore_cluster.dsc[each.value.dsc_name].id, null)
  disks                = [each.value.naa]
}

Debug Output

no output

Panic Output

No response

Expected Behavior

All hosts in cluster get datastore.

Actual Behavior

Only host specified in host_system_id has the datastore mounted.

Steps to Reproduce

Add datastore.

Environment Details

Using FC for the storage.

Screenshots

image

Mounted Host

image

Non-mounted Host

image

References

No response

github-actions[bot] commented 6 months ago

Hello, rmtilson! šŸ–

Thank you for submitting an issue for this provider. The issue will now enter into the issue lifecycle.

If you want to contribute to this project, please review the contributing guidelines and information on submitting pull requests.