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

d/vsphere_guest_os_customization: windows returns null #2265

Open
1 of 4 tasks
dhinesku opened this issue Sep 19, 2024 · 2 comments
Open
1 of 4 tasks

d/vsphere_guest_os_customization: windows returns null #2265

dhinesku opened this issue Sep 19, 2024 · 2 comments
Assignees
Labels
bug Type: Bug needs-triage Status: Issue Needs Triage
Milestone

Comments

@dhinesku
Copy link

dhinesku commented Sep 19, 2024

Community Guidelines

  • I have read and agree to the HashiCorp Community Guidelines .
  • 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.9.6

Terraform Provider

2.9.2

VMware vSphere

8.0.2

Description

The Data block for vsphere_guest_os_customization for Windows type returns spec as null. The Spec is available on the vSphere, though.

Affected Resources or Data Sources

data/vsphere_guest_os_customization

Terraform Configuration

data "vsphere_guest_os_customization" "gosc1" {
    name = "windows-spec"
  }

Debug Output

NA

Panic Output

No response

Expected Behavior

The data block should return spec available on the resource. As the Linux type returns the data as available and accurate in the vSphere.

Actual Behavior

The data block of spec returns null.

Steps to Reproduce

  1. Create a vsphere_guest_os_customization in vSphere through terraform or manual from the vSphere with type as Windows/
  2. Retrieve the vsphere_guest_os_customization and check the spec.

Environment Details

No response

Screenshots

image

References

No response

@dhinesku dhinesku added bug Type: Bug needs-triage Status: Issue Needs Triage labels Sep 19, 2024
Copy link

Hello, dhinesku! 🖐

Thank you for submitting an issue for this provider. The issue will now enter into the issue lifecycle.

If you want to contribute to this project, please review the contributing guidelines and information on submitting pull requests.

@tenthirtyam tenthirtyam changed the title Customisation Spec for Windows is null in data block d/vsphere_guest_os_customization: windows returns null Sep 19, 2024
@tenthirtyam tenthirtyam added this to the Backlog milestone Sep 19, 2024
@tenthirtyam
Copy link
Collaborator

Confirmed.

provider "vsphere" {
    user           = "[email protected]"
    password       = "..."
    vsphere_server = "..."
    allow_unverified_ssl = true
}

data "vsphere_guest_os_customization" "foo" {
    name = "foo_windows"
}

data "vsphere_guest_os_customization" "bar" {
    name = "bar_linux"
}
{
  "version": 4,
  "terraform_version": "1.9.5",
  "serial": 1,
  "lineage": "3f4756c9-7f16-9b6e-4c10-aa26d3af2475",
  "outputs": {},
  "resources": [
    {
      "mode": "data",
      "type": "vsphere_guest_os_customization",
      "name": "bar",
      "provider": "provider[\"registry.terraform.io/hashicorp/vsphere\"]",
      "instances": [
        {
          "schema_version": 0,
          "attributes": {
            "change_version": "1726772246",
            "description": "Bar",
            "id": "bar_linux",
            "last_update_time": "2024-09-19 18:57:26 +0000 UTC",
            "name": "bar_linux",
            "spec": [
              {
                "dns_server_list": [
                  "1.1.1.1",
                  "8.8.8.8",
                  "8.8.4.4"
                ],
                "dns_suffix_list": [],
                "linux_options": [
                  {
                    "domain": "example.com",
                    "host_name": "",
                    "hw_clock_utc": true,
                    "script_text": "",
                    "time_zone": "US/Eastern"
                  }
                ],
                "network_interface": [
                  {
                    "dns_domain": "",
                    "dns_server_list": [],
                    "ipv4_address": "",
                    "ipv4_netmask": 0,
                    "ipv6_address": "",
                    "ipv6_netmask": 0
                  }
                ],
                "windows_options": [],
                "windows_sysprep_text": ""
              }
            ],
            "type": "Linux"
          },
          "sensitive_attributes": []
        }
      ]
    },
    {
      "mode": "data",
      "type": "vsphere_guest_os_customization",
      "name": "foo",
      "provider": "provider[\"registry.terraform.io/hashicorp/vsphere\"]",
      "instances": [
        {
          "schema_version": 0,
          "attributes": {
            "change_version": "1726771695",
            "description": "Foo",
            "id": "foo_windows",
            "last_update_time": "2024-09-19 18:48:15 +0000 UTC",
            "name": "foo_windows",
            "spec": null,
            "type": "Windows"
          },
          "sensitive_attributes": []
        }
      ]
    }
  ],
  "check_results": null
}

@tenthirtyam tenthirtyam self-assigned this Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Type: Bug needs-triage Status: Issue Needs Triage
Projects
None yet
Development

No branches or pull requests

2 participants