vmware / terraform-provider-vcf

Terraform Provider for VMware Cloud Foundation
https://registry.terraform.io/providers/vmware/vcf/
Mozilla Public License 2.0
21 stars 9 forks source link

Add support for `d/vcf_host` #200

Open pradeep17j opened 2 months ago

pradeep17j commented 2 months ago

Code of Conduct

Description

In a scenario where we get an instance and we need to use Terraform to do a Day-2 operation like domain or cluster creation we will have to go into the setup to get the IDs of the free hosts.

The provider does not have a data source implemented for hosts which is equivalent for API like GET sddc-manager/v1/hosts.

data vcf_hosts "all_hosts" {
}   

Use Case(s)

Return list of all hosts and ability to filter based on status.

data vcf_hosts "all_hosts" {
}

Potential Configuration

TBD

References

No response

tenthirtyam commented 1 month ago

Hi @pradeep17j 👋 -

I have formatted the issue content. We kindly ask that you do the same for future issues.

Ryan Johnson Distinguished Engineer, VMware by Broadcom

tenthirtyam commented 4 weeks ago

Hi @pradeep17j 👋 -

I've added and linked https://github.com/vmware/terraform-provider-vcf/pull/236 to this issue. This will ba the vcf_host data source for single hosts.

I may plan to look into a vcf_hosts data source after this one that is the pluralization based on the added context of this issue. It's a common ask in some providers to support the plural form.

Ryan