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

feat: add d/host #266

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

feat: add d/host #266

wants to merge 1 commit into from

Conversation

tenthirtyam
Copy link
Collaborator

In order to have a good experience with our community, we recommend that you read the contributing guidelines for making a pull request.

Summary of Pull Request

Adds a data source for host: data/vcf_host.

Type of Pull Request

  • This is a bug fix.
  • This is an enhancement or feature.
  • This is a code style/formatting update.
  • This is a documentation update.
  • This is a refactoring update.
  • This is a chore update
  • This is something else.
    Please describe:

Related to Existing Issues

Closes #200

Test and Documentation Coverage

For bug fixes or features:

  • Tests have been completed.
  • Documentation has been added/updated.
Running tool: /usr/local/bin/go test -timeout 30s -run ^TestAccDataSourceVcfHost$ github.com/vmware/terraform-provider-vcf/internal/provider

ok  	github.com/vmware/terraform-provider-vcf/internal/provider	(cached)
$ terraform apply --auto-approve

│ Warning: Provider development overrides are in effect

│ The following provider development overrides are set in the CLI configuration:
│  - vmware/vcf in C:\Users\Administrator\go\bin

│ The behavior may therefore not match any released version of the provider and applying changes may cause the state to become incompatible with published releases.

data.vcf_host.example: Reading...
data.vcf_host.example: Read complete after 1s [id=f852fa5a-dc21-4a02-a1dd-862768d8a296]

No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration and found no differences, so no changes are needed.

Apply complete! Resources: 0 added, 0 changed, 0 destroyed.

Outputs:

host_cluster = [
  {
    "id" = "56e10eb8-1ba8-45eb-9014-e5bb23454a75"
  },
]
host_cpu = [
  {
    "cores" = 16
    "cpu_cores" = [
      {
        "frequency_mhz" = 1995.312255859375
        "manufacturer" = "Intel(R) Xeon(R) Gold 6330 CPU @ 2.00GHz"
        "model" = "intel"
      },
      {
        "frequency_mhz" = 1995.312255859375
        "manufacturer" = "Intel(R) Xeon(R) Gold 6330 CPU @ 2.00GHz"
        "model" = "intel"
      },
    ]
    "frequency_mhz" = 31924.99609375
    "used_frequency_mhz" = 2318
  },
]
host_domain = [
  {
    "id" = "26731017-6477-45c5-8a48-42243e64bab0"
  },
]
host_fqdn = "sfo01-m01-r01-esx01.sfo.rainpole.io"
host_hardware = [
  {
    "hybrid" = true
    "model" = "VMware Virtual Platform"
    "vendor" = "VMware, Inc."
  },
]
host_id = "f852fa5a-dc21-4a02-a1dd-862768d8a296"
host_ip_addresses = [
  {
    "ip_address" = "10.11.11.101"
    "type" = "MANAGEMENT"
  },
  {
    "ip_address" = "10.11.13.101"
    "type" = "VSAN"
  },
  {
    "ip_address" = "10.11.12.101"
    "type" = "VMOTION"
  },
]
host_memory = [
  {
    "total_capacity_mb" = 131071.421875
    "used_capacity_mb" = 38174
  },
]
host_network_pool = [
  {
    "id" = "7f794918-b37b-4dc0-8960-dc827a4b1b4e"
    "name" = "sfo-m01-r01-network-pool-01"
  },
]
host_physical_nics = [
  {
    "device_name" = "vmnic0"
    "mac_address" = "00:50:56:9c:4c:d7"
    "speed" = 10000
    "unit" = "MB"
  },
  {
    "device_name" = "vmnic1"
    "mac_address" = "00:50:56:9c:30:e6"
    "speed" = 10000
    "unit" = "MB"
  },
]
host_status = "ASSIGNED"
host_storage = [
  {
    "disks" = [
      {
        "capacity_mb" = 524288
        "disk_type" = "HDD"
        "manufacturer" = ""
        "model" = ""
      },
      {
        "disk_type" = "HDD"
        "manufacturer" = ""
        "model" = ""
      },
      {
        "capacity_mb" = 524288
        "disk_type" = "FLASH"
        "manufacturer" = ""
        "model" = ""
      },
    ]
    "total_capacity_mb" = 8388480
    "used_capacity_mb" = 282532.8125
  },
]
host_version = "8.0.3-24280767"

Breaking Changes?

  • Yes, there are breaking changes.
  • No, there are no breaking changes.

Adds a data source for host: `data/vcf_host`.

Signed-off-by: Ryan Johnson <ryan.johnson@broadcom.com>
@tenthirtyam tenthirtyam added enhancement Enhancement datasource Provider Datasource labels Nov 13, 2024
@tenthirtyam tenthirtyam self-assigned this Nov 13, 2024
@tenthirtyam tenthirtyam added this to the v0.12.0 milestone Nov 13, 2024
@github-actions github-actions bot added documentation Documentation needs-review Needs Review provider Provider labels Nov 13, 2024
@tenthirtyam tenthirtyam modified the milestones: v0.12.0, On Deck Nov 13, 2024
@tenthirtyam
Copy link
Collaborator Author

Rebased based on the changes to main recently. Will need updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datasource Provider Datasource documentation Documentation enhancement Enhancement needs-review Needs Review provider Provider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for d/vcf_host
1 participant