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

Supervisor Cluster creation fails with 404 #2320

Open
4 tasks done
stevet312 opened this issue Jan 16, 2025 · 1 comment
Open
4 tasks done

Supervisor Cluster creation fails with 404 #2320

stevet312 opened this issue Jan 16, 2025 · 1 comment
Labels
bug Type: Bug needs-triage Status: Issue Needs Triage

Comments

@stevet312
Copy link

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.8.3

Terraform Provider

2.10.0

VMware vSphere

8.0.3

Description

During 'terraform apply' the vsphere_provider is throwing a 404 for the vCenter API call.

SOAP session and Rest Client appear to be successful but

POST https://vcenter.fqdn/api/vcenter/namespace-management/clusters/domain-c9?action=enable: 404 Not Found. Which appears to be the correct API call.

ESXi hosts are licensed for WCP Enterprise Plus (which generally results in a 500).

Affected Resources or Data Sources

resource/vsphere_supervisor

Terraform Configuration

terraform {
  required_providers {
    vsphere = {
      source = "hashicorp/vsphere"
    }
  }
}

provider "vsphere" {
  user                 = var.vcenter_username
  password             = var.vcenter_password
  vsphere_server       = var.vcenter_server
  allow_unverified_ssl = true
  api_timeout          = 10
}
# --------------------------------------------------------------- #
# vCenter Object Discovery
# --------------------------------------------------------------- #
data "vsphere_content_library" "library" {
  name = var.content_library
}

data "vsphere_datacenter" "datacenter" {
  name = var.datacenter
}

data "vsphere_compute_cluster" "compute_cluster" {
  name          = var.cluster
  datacenter_id = data.vsphere_datacenter.datacenter.id
}

data "vsphere_storage_policy" "storage_policy" {
  name = var.storage_policy_name
}

data "vsphere_network" "mgmt_net" {
  name          = var.management_network.name
  datacenter_id = data.vsphere_datacenter.datacenter.id
}

data "vsphere_distributed_virtual_switch" "dvs" {
  name          = var.dvs
  datacenter_id = data.vsphere_datacenter.datacenter.id
}

data "vsphere_host" "esxi_host" {
  name          = var.esxi_host
  datacenter_id = data.vsphere_datacenter.datacenter.id
}


# --------------------------------------------------------------- #
# Supervisor Cluster Configuration
# --------------------------------------------------------------- #
resource "vsphere_virtual_machine_class" "vm_class" {
  name               = var.vm_class_settings.name
  cpus               = var.vm_class_settings.num_cpu
  memory             = var.vm_class_settings.memory
  memory_reservation = var.vm_class_settings.reservation
}

resource "vsphere_supervisor" "supervisor" {
  cluster         = data.vsphere_compute_cluster.compute_cluster.id
  storage_policy  = data.vsphere_storage_policy.storage_policy.name
  content_library = data.vsphere_content_library.library.id
  main_dns        = [var.dns.environment]
  worker_dns      = [var.dns.worker]
  search_domains  = var.search_domains
  dvs_uuid        = data.vsphere_distributed_virtual_switch.dvs.id
  sizing_hint     = var.k8s_api_size

  edge_cluster = var.edge_cluster

  management_network {
    network          = data.vsphere_network.mgmt_net.id
    subnet_mask      = var.management_network.mask
    starting_address = var.management_network.start_ip
    gateway          = var.management_network.gateway
    address_count    = var.management_network.pool_size
  }

  ingress_cidr {
    address = var.k8s_networks_ext.ingress_net
    prefix  = var.k8s_networks_ext.prefix
  }

  egress_cidr {
    address = var.k8s_networks_ext.egress_net
    prefix  = var.k8s_networks_ext.prefix
  }

  service_cidr {
    address = var.k8s_networks_ext.service_net
    prefix  = var.k8s_networks_ext.prefix
  }

  pod_cidr {
    address = var.pod_net.network
    prefix  = var.pod_net.prefix
  }

  namespace {
    name              = var.namespace_name
    content_libraries = [data.vsphere_content_library.library.id]
    vm_classes        = [vsphere_virtual_machine_class.vm_class.id]
  }
}

Debug Output

https://gist.github.com/stevet312/639f7573d18d2343db2cd8bb0c9c6538

Panic Output

No response

Expected Behavior

The expected behavior is to complete the namespace creation workflow for vSphere k8s workloads.

Actual Behavior

Terraform provider does not correctly apply configuration.

Steps to Reproduce

This appears to be the current behavior of the provider natively. Any standard workflow should reproduce this.

Environment Details

No response

Screenshots

No response

References

No response

@stevet312 stevet312 added bug Type: Bug needs-triage Status: Issue Needs Triage labels Jan 16, 2025
Copy link

Hello, stevet312! 🖐

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.

@stevet312 stevet312 changed the title REPLACE WITH A SHORT DESCRIPTION Supervisor Cluster creation fails with 404 Jan 16, 2025
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

1 participant