vmware / terraform-provider-vcf

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

workload_domain resource does not allow creation of domain with shared NSXT cluster #178

Closed pradeep17j closed 5 months ago

pradeep17j commented 5 months ago

Code of Conduct

Description

workload domain can share a NSXT cluster with an existing domain in which can the spec should be able to take only vip_fqdn and nsxt license of an existing domain.

Use Case(s)

Creation of workload domain with shared NSXT

Potential Configuration

Creation of workload domain with shared NSXT

References

When tried it fails with error

Error: Insufficient nsx_manager_node blocks │ │ on main.tf line 222, in resource "vcf_domain" "workload_domain3": │ 222: nsx_configuration { │ │ At least 1 "nsx_manager_node" blocks are required.

spacegospod commented 5 months ago

Hey @pradeep17j AFAIK what you are asking for is officially supported by the domain manager UI. On the other hand the docs for the API state otherwise. nsxtManagerSpecs is a required field https://developer.broadcom.com/xapis/vmware-cloud-foundation-api/latest/data-structures/NsxTSpec

If we go along with the assumption that the API documentation is incorrect I will have to do some reverse-engineering and patch the SDK before I can implement this.

Meanwhile if you have any additional information please share. For example - can the NSX manager from management domains be shared with workload domains? Or is there any minimum for the number of nodes when sharing?

spacegospod commented 5 months ago

Alright, I figured it out.

It turns out that in order to reuse the NSX manager of another domain you simply have to populate its data in the input spec. To be precise - you need to populate the vip, vipFQDN and the nsxtManagerSpec fields.

Closing this issue since the requested functionality is already supported by the provider.

github-actions[bot] commented 4 months ago

I'm going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.