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/cluster: import does not include vmnic and vds #210

Open
4 tasks done
pradeep17j opened this issue Jul 30, 2024 · 7 comments · May be fixed by #232 or #235
Open
4 tasks done

r/cluster: import does not include vmnic and vds #210

pradeep17j opened this issue Jul 30, 2024 · 7 comments · May be fixed by #232 or #235
Assignees
Labels
bug Bug
Milestone

Comments

@pradeep17j
Copy link

pradeep17j commented Jul 30, 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

v1.7.3

Terraform Provider

v0.10.0

VMware Cloud Foundation

5.2

Description

Import of a cluster resource does not return vmnic and vds information. If there is a existing cluster that needs to converted to a terraform managed resource, an import can be done and show can be used to extract the resource config file. If this resource does not have all the required fields for cluster operations, terraform plan and apply will not work

Affected Resources or Data Sources

r/vcf_cluster

Terraform Configuration

Output of terraform show:

https://gist.github.com/pradeep17j/f0d31382dd8791c9da0faab87ce36c6a

Debug Output

terraform.tfstate file after import:

https://gist.github.com/pradeep17j/9d5c926fa805260b825c37200afe6fd0

Panic Output

No response

Expected Behavior

Return all the required fields for a resource when performing an import operation.

Actual Behavior

The vds and vmnic information missing after an import operation.

Steps to Reproduce

Example:

terraform import vcf_cluster.clus2 "801b1c2f-33be-497b-bc28-04fc463fa40d"

801b1c2f-33be-497b-bc28-04fc463fa40d is the ID of the management domain default cluster.

Environment Details

No response

Screenshots

No response

References

No response

@pradeep17j pradeep17j added bug Bug needs-triage Needs Triage labels Jul 30, 2024
@github-actions github-actions bot added the pending-review Pending Review label Jul 30, 2024
@tenthirtyam tenthirtyam removed the pending-review Pending Review label Jul 30, 2024
@tenthirtyam tenthirtyam added this to the Backlog milestone Jul 30, 2024
@tenthirtyam tenthirtyam changed the title Import a cluster resource does not return vmnic and vds information `r/cluster: import does not include vmnic and vds Jul 30, 2024
@tenthirtyam tenthirtyam changed the title `r/cluster: import does not include vmnic and vds r/cluster: import does not include vmnic and vds Jul 30, 2024
@pradeep17j
Copy link
Author

pradeep17j commented Jul 31, 2024

The same issue happens with d/vcf_instance. It returns back empty vmnic and vds information.

Please fix also:

  data vcf_cluster {
  }

The output returned back from data vcf_instance { } is as below

  data "vcf_cluster" "cluster1" {
    cluster_id             = "801b1c2f-33be-497b-bc28-04fc463fa40d"
    domain_id              = "46ec313d-e782-4f46-b6c9-eb62e9b2b5d3"
    host                   = [
        {
            availability_zone_name = ""
            host_name              = "esxi-3.vrack.vsphere.local"
            id                     = "03d85265-48ce-48e4-af7e-fd4ac6bc5b27"
            ip_address             = "10.0.4.5"
            license_key            = ""
            password               = ""
            serial_number          = ""
            ssh_thumbprint         = ""
            username               = ""
            vmnic                  = []
        },
      ]
    id                     = "801b1c2f-33be-497b-bc28-04fc463fa40d"
    is_default             = true
    is_stretched           = false
    name                   = "sddcId-10011"
    primary_datastore_name = "sddc_mgmt_vsan"
    primary_datastore_type = "VSAN"
    vds                    = []
  }

@tenthirtyam
Copy link
Contributor

@pradeep17j please use the markdown editor tools to apply content formatting.

@tenthirtyam tenthirtyam removed the needs-triage Needs Triage label Aug 8, 2024
@tenthirtyam
Copy link
Contributor

The same issue happens with d/vcf_instance. It returns back empty vmnic and vds information.

Please fix also:

  data vcf_cluster {
  }

Hi @pradeep17j 👋 - Please open a seperate issue for this issue with d/vcf_instance.

Ryan Johnson
Distinguished Engineer, VMware by Broadcom

@tenthirtyam
Copy link
Contributor

Hi @pradeep17j 👋 -

I have formatted the issue content and version updated to reflect supported and shipping versions that the provider supports.

We kindly ask that you do the same for future issues.

Ryan Johnson
Distinguished Engineer, VMware by Broadcom

@burnsjared0415
Copy link
Contributor

will pick this up

@tenthirtyam
Copy link
Contributor

Assigned to Jared Burns, VMware by Broadcom.

@burnsjared0415
Copy link
Contributor

the problem is that the current code does not call the correct API to get vds configuration, the ImportCluster calls /v1/clusters, to get vds information you have to call /v1/clusters/{id}/vdses which is not in the code here

@burnsjared0415 burnsjared0415 linked a pull request Aug 21, 2024 that will close this issue
11 tasks
@tenthirtyam tenthirtyam modified the milestones: v0.11.0, On Deck Aug 21, 2024
@tenthirtyam tenthirtyam linked a pull request Aug 23, 2024 that will close this issue
11 tasks
@tenthirtyam tenthirtyam linked a pull request Aug 23, 2024 that will close this issue
11 tasks
@tenthirtyam tenthirtyam linked a pull request Aug 23, 2024 that will close this issue
11 tasks
@tenthirtyam tenthirtyam modified the milestones: On Deck, v0.11.0 Aug 23, 2024
@tenthirtyam tenthirtyam modified the milestones: v0.11.0, On Deck Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment