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

Add support for vApp template #741

Closed
AlexanderB1290 opened this issue Nov 11, 2021 · 7 comments
Closed

Add support for vApp template #741

AlexanderB1290 opened this issue Nov 11, 2021 · 7 comments
Assignees

Comments

@AlexanderB1290
Copy link

AlexanderB1290 commented Nov 11, 2021

Affected resources and data sources:

  • vcd_vapp
  • vcd_resource_list

Adding support for vApp templates will reduce the need to create new vApps from the ground up. The proposition is to add optional parameters to the mentioned resources and data source for deploying and obtaining a vApp template:

  • catalog_name - corresponding to the name of the catalog from which the vApp template need to be loaded.
  • template_name - corresponding to the name of the vApp template which is loaded using data source or deployed using resource respectively.

This way a vApp could be created using the following example:

resource "vcd_vapp" "my_vapp" {
      name = "my_vapp_name"
      catalog_name = "my_catalog_name" #Name of the catalog from which the vApp template is taken
      template_name = "my_vapp_template_from_catalog" #Name of the vApp template used to deploy a new vApp
}

The vApp template can be obtained in similar way using a data source:

data "vcd_vapp" "other_vapp" {
      name = "other_vapp_template" #Name of the vApp or vApp template
      catalog_name = "other_vapp_template_catalog" #Name of the catalog from which to take the vApp template.
}

If the attribute catalog_name is not provided, the data source needs to return a vApp, not vApp template.

Using the vcd_resource_list to be able to obtain the names of the virtual machines inside an existing vApp template:

data "vcd_resource_list" "vm_list" {
     name = "vm_list_vapp_template"
     parent = "my_vapp_template_name" #Name of the vApp or vApp template
     catalog_name = "my_catalog_name" #Name of the catalog from which vApp template is taken
}

If the attribute catalog_name is not provided, the data source needs to return virtual machine names from a vApp, not vApp template.

@dataclouder
Copy link
Contributor

Related to #502

@vbauzys
Copy link
Contributor

vbauzys commented Jan 21, 2022

This may be implemented only in one way, you can deploy but not manage it after that. I mean recreate, delete ok, but any change of internal details (VM, CPU, memory, disks, customization, etc.) won't be possible as this is not how terraform HCL works.

@AlexanderB1290
Copy link
Author

AlexanderB1290 commented Mar 10, 2022

@vbauzysvmware I am fine with this approach! In the current Global Lab environment we are always do an identical copy. So... Such customizations are done by the users only as Day-2 operations using the vCD UI.
Our main goal is to use this as FaaS function exposed to the end user. The user will request this once, to create the vapp from a template, than he can handle everything he likes. We are also focusing on faster provision times. With Terraform we managed to deploy a vApp in about 30 min, compared to 2h previously.

@vbauzys
Copy link
Contributor

vbauzys commented Mar 17, 2022

@AlexanderB1290 can you share for which company this is needed? :)

@carlschroder
Copy link

I'd greatly appreciate this feature set too!!
At first thought, I was missing something building up the vApp from current docs, but then no way to grab the vApp template contents from the content_library item :(

@AlexanderB1290
Copy link
Author

AlexanderB1290 commented Apr 28, 2022

@vbauzysvmware For VMware. :) I am part of the Global Labs and we are supporting several cloud locations using vCD.

@dataclouder
Copy link
Contributor

dataclouder commented Jul 20, 2023

Implemented in v3.10.0

vcd_cloned_vapp

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

No branches or pull requests

4 participants