Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

r/csr fails for SDDC_MANAGER and NSXT_MANAGER #195

Closed
1 of 4 tasks
smctighevcp opened this issue Jun 28, 2024 · 2 comments · Fixed by #196
Closed
1 of 4 tasks

r/csr fails for SDDC_MANAGER and NSXT_MANAGER #195

smctighevcp opened this issue Jun 28, 2024 · 2 comments · Fixed by #196
Assignees
Labels
bug Bug
Milestone

Comments

@smctighevcp
Copy link

smctighevcp commented Jun 28, 2024

Code of Conduct

  • I have read and agree to the Code of Conduct.
  • Vote on this issue by adding a 👍 reaction to the original issue initial description to help the maintainers prioritize.
  • Do not leave "+1" or other comments that do not add relevant information or questions.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Terraform

1.8.5

Terraform Provider

0.9.1

VMware Cloud Foundation

5.1

Description

When attempting to generate a CSR using the resource vcf_csr for SDDC_MANAGER or NSXT_MANAGER it errors reporting that it could not determine the FQDN for the resource type.

Working ok of the VCENTER resource type only.

Affected Resources or Data Sources

resource/vcf_csr

Terraform Configuration

# Generate CSR for SDDC Manager - NOT WORKINGresource "vcf_csr" "sddc" {
│   resource          = var.vcf_csr_demo.sddc_manager.resourcekey_size          = var.vcf_csr_demo.sddc_manager.key_sizedomain_id         = var.vcf_csr_demo.sddc_manager.domain_idorganization      = var.vcf_csr_demo.sddc_manager.organizationorganization_unit = var.vcf_csr_demo.sddc_manager.organization_unitlocality          = var.vcf_csr_demo.sddc_manager.localitystate             = var.vcf_csr_demo.sddc_manager.statecountry           = var.vcf_csr_demo.sddc_manager.countryemail             = var.vcf_csr_demo.sddc_manager.email
│ }

│ # Generate CSR for vCenter - WOKINGresource "vcf_csr" "vcenter" {
│  resource          = var.vcf_csr_demo.vcenter.resourcekey_size          = var.vcf_csr_demo.vcenter.key_sizedomain_id         = var.vcf_csr_demo.vcenter.domain_idorganization      = var.vcf_csr_demo.vcenter.organizationorganization_unit = var.vcf_csr_demo.vcenter.organization_unitlocality          = var.vcf_csr_demo.vcenter.localitystate             = var.vcf_csr_demo.vcenter.statecountry           = var.vcf_csr_demo.vcenter.countryemail             = var.vcf_csr_demo.vcenter.email
│ }

│ # Generate CSR for NSX Managers - NOT WORKINGresource "vcf_csr" "nsxt_manager" {
│   resource          = var.vcf_csr_demo.nsx.resourcekey_size          = var.vcf_csr_demo.vcenter.key_sizedomain_id         = var.vcf_csr_demo.vcenter.domain_idorganization      = var.vcf_csr_demo.vcenter.organizationorganization_unit = var.vcf_csr_demo.vcenter.organization_unitlocality          = var.vcf_csr_demo.vcenter.localitystate             = var.vcf_csr_demo.vcenter.statecountry           = var.vcf_csr_demo.vcenter.countryemail             = var.vcf_csr_demo.vcenter.email
│ }

Debug Output

https://gist.github.com/smctighevcp/397826ece0fb478c8caa0093dea26e4d

Panic Output

No response

Expected Behavior

Should generate a CSR in SDDC for SDDC and NSX-Managers.

Actual Behavior

Fails as unable to determine FQN for the resource type

│ Error: could not determine FQDN for resourceType NSXT_MANAGER in domain f15d76d5-96e0-4b95-8d4c-46cc93ef3478

│   with vcf_csr.nsxt_manager,
│   on main.tf line 28, in resource "vcf_csr" "nsxt_manager":
│   28: resource "vcf_csr" "nsxt_manager" {

Steps to Reproduce

Attempt to generate a CSR for SDDC_MANAGER or NSXT_MANAGER using resource/vcf_csr.

Environment Details

No response

Screenshots

No response

References

No response

@smctighevcp smctighevcp added bug Bug needs-triage Needs Triage labels Jun 28, 2024
@github-actions github-actions bot added the pending-review Pending Review label Jun 28, 2024
@spacegospod
Copy link
Contributor

spacegospod commented Jun 28, 2024

We dug into this one offline with @smctighevcp

It appears that vcf_csr uses v1/domains/<domain_id>/endpoints to determine the FQDN for the provided resource type automatically.
This endpoint only works for resources of type VCENTER since the others are not present in its response.

@spacegospod spacegospod self-assigned this Jun 28, 2024
@spacegospod spacegospod removed needs-triage Needs Triage pending-review Pending Review labels Jun 28, 2024
@tenthirtyam tenthirtyam added this to the Backlog milestone Jun 28, 2024
@tenthirtyam tenthirtyam modified the milestones: Backlog, 0.10.0 Jul 5, 2024
@tenthirtyam tenthirtyam changed the title VCF_CSR Resource fails for SDDC_MANAGER & NSXT_MANAGER r/csr fails for SDDC_MANAGER and NSXT_MANAGER Jul 5, 2024
Copy link

github-actions bot commented Aug 8, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants