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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for deploying an OVF as a Template (not VM) #2114

Open
4 tasks done
dejarikra opened this issue Jan 13, 2024 · 7 comments
Open
4 tasks done

Add support for deploying an OVF as a Template (not VM) #2114

dejarikra opened this issue Jan 13, 2024 · 7 comments
Labels
enhancement Type: Enhancement

Comments

@dejarikra
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.

Description

Currently, the provider has the vsphere_ovf_vm_template data object, with examples on how to use it to create a VM off of it.

However, attempting to use the vsphere_ovf_vm_template data object directly without a corresponding vsphere_vm resource doesn't actually result in creating an OVF Template on vSphere. On the other hand, such an independent template could directly be created on vSphere using the HTML client.

For reference, here is a snippet of the data object I used.

data "vsphere_ovf_vm_template" "eksa_bottlerocket" {
  name  = trimsuffix(reverse(split("/", var.eksa_bottlerocket_ova_url))[0], ".ova")

  resource_pool_id  = vsphere_resource_pool.eksa.id
  host_system_id    = vsphere_host.esxi01.id
  datastore_id      = data.vsphere_datastore.iscsi01_esxi01.id
  folder            = vsphere_folder.eksa_templates.path

  remote_ovf_url            = var.eksa_bottlerocket_ova_url
  allow_unverified_ssl_cert = true

  disk_provisioning = "thin"
  ovf_network_map = {
    "VM Network" : vsphere_distributed_port_group.VM_vcsa01.id
  }
}

I understand that data objects are NOT used to create actual resources on the target infrastructure. It would be great if we can have a corresponding resource object to create an OVF VM Template directly on vSphere.

Use Case(s)

I'm currently in the process of deploying an EKS Anywhere Cluster on my vSphere environment. As per AWS's documentation, one of the requirements is to have an OVA template already available on vSphere.

Potential Terraform Provider Configuration

I envision that the vsphere_ovf_vm_template resource be more or less similar to the vsphere_ovf_vm_template data object, whose documentation can be found here.

References

No response

@dejarikra dejarikra added the enhancement Type: Enhancement label Jan 13, 2024
Copy link

Hello, dejarikra! 馃枑

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
Copy link
Collaborator

If you need to create an OVF template, why not use Packer?

@tenthirtyam
Copy link
Collaborator

I'm not sure the title - "Add support for deploying an OVF template to vSphere" - is an accurate description of the ask here. Today, the provider does support deploying a virtual machine from either a template as well as from a local or remote OVA/OVF. It sounds more like you are asking for the ability to deploy the OVA/OVF but set it as a template instead of powering it on.

@dejarikra
Copy link
Author

I'm not sure the title - "Add support for deploying an OVF template to vSphere" - is an accurate description of the ask here. Today, the provider does support deploying a virtual machine from either a template as well as from a local or remote OVA/OVF. It sounds more like you are asking for the ability to deploy the OVA/OVF but set it as a template instead of powering it on.

Yes, this is exactly what I am trying to do. I will update the title accordingly.

@dejarikra dejarikra changed the title Add support for deploying an OVF template to vSphere Add support for deploying an OVF template as a Template (not VM) Jan 13, 2024
@dejarikra dejarikra changed the title Add support for deploying an OVF template as a Template (not VM) Add support for deploying an OVF as a Template (not VM) Jan 13, 2024
@tenthirtyam
Copy link
Collaborator

More closely aligned with the existing enhancement item #1180.

@kastl-ars
Copy link

I would really like to see this feature, as it took me quite some time to find out from the big documentation that this is just not possible...

@alonkaliber
Copy link

More closely aligned with the existing enhancement item #1180.

That would be extremely helpful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Type: Enhancement
Projects
None yet
Development

No branches or pull requests

4 participants