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

Incorrect ResourceType for NSX Edge #214

Closed
4 tasks done
insidepacket opened this issue Aug 13, 2024 · 3 comments · Fixed by #215
Closed
4 tasks done

Incorrect ResourceType for NSX Edge #214

insidepacket opened this issue Aug 13, 2024 · 3 comments · Fixed by #215
Assignees
Labels
bug Bug
Milestone

Comments

@insidepacket
Copy link
Contributor

insidepacket commented Aug 13, 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

v.1.9.4

Terraform Provider

v0.10.0

VMware Cloud Foundation

v5

Description

When using resource type NSX_Edge to rotate NSX Edge credentials. It can't find any NSX edge credentials although the API calls can retrieve NSX Edge system credentials. I have identified the issue: The provider requests resourceType: NSX_EDGE but API response suggest that the right resourceType: NSXT_EDGE.

Affected Resources or Data Sources

r/credentials

Terraform Configuration

https://gist.github.com/insidepacket/b549c31c581b4f9f70cda66750039dc1

Debug Output

https://gist.github.com/insidepacket/b549c31c581b4f9f70cda66750039dc1

Panic Output

No response

Expected Behavior

Can get the NSX Edge system credentials and rotate it.

Actual Behavior

Unable to find any NSX Edge system credentials.

Steps to Reproduce

Step 1: stand up a VCF instance or have an existing instance.
Step 2: create the TF template
Step 3: terraform apply or terraform plan.

Environment Details

No response

Screenshots

No response

References

No response

@insidepacket insidepacket added bug Bug needs-triage Needs Triage labels Aug 13, 2024
@github-actions github-actions bot added the pending-review Pending Review label Aug 13, 2024
@tenthirtyam tenthirtyam removed the pending-review Pending Review label Aug 13, 2024
@tenthirtyam
Copy link
Collaborator

tenthirtyam commented Aug 13, 2024

Issue seems to be from the following const for ResourceTypeNsxEdge in L15.

const (
ResourceTypeEsxi = "ESXI"
ResourceTypeVcenter = "VCENTER"
ResourceTypePsc = "PSC"
ResourceTypeNsxManager = "NSX_MANAGER"
ResourceTypeNsxController = "NSX_CONTROLLER"
ResourceTypeNsxEdge = "NSX_EDGE"
ResourceTypeNsxtManager = "NSXT_MANAGER"
ResourceTypeVrli = "VRLI"
ResourceTypeVra = "VRA"
ResourceTypeWsa = "WSA"
ResourceTypeVrslcm = "VRSLCM"
ResourceTypeVxrailManager = "VXRAIL_MANAGER"
ResourceTypeNsxAlb = "NSX_ALB"
ResourceTypeBackup = "BACKUP"
)

@tenthirtyam tenthirtyam removed the needs-triage Needs Triage label Aug 13, 2024
@tenthirtyam tenthirtyam added this to the v0.11.0 milestone Aug 13, 2024
@tenthirtyam tenthirtyam self-assigned this Aug 13, 2024
@tenthirtyam tenthirtyam changed the title Wrong ResourceType for NSX Edge INcorrect ResourceType for NSX Edge Aug 13, 2024
@tenthirtyam tenthirtyam changed the title INcorrect ResourceType for NSX Edge Incorrect ResourceType for NSX Edge Aug 13, 2024
@insidepacket
Copy link
Contributor Author

@tenthirtyam, you were faster than me to create the PR.

Copy link

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 Sep 22, 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.

2 participants