{"id":26716826,"url":"https://github.com/global-vmware/vcd_vapp_vm","last_synced_at":"2025-03-27T15:47:54.109Z","repository":{"id":153900312,"uuid":"630586570","full_name":"global-vmware/vcd_vapp_vm","owner":"global-vmware","description":"This Repository contains the \"vcd_vapp_vm\" Terraform Module. You can use this Module to deploy Virtual Machines into a Virtual Application (vApp) that is in a VMware Cloud Director (VCD) Environment.","archived":false,"fork":false,"pushed_at":"2025-03-13T21:23:41.000Z","size":66,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T21:25:17.410Z","etag":null,"topics":["infrastructure-as-code","terraform","terraform-module","vapp","vm","vmware"],"latest_commit_sha":null,"homepage":"https://www.rackspace.com/cloud/vmware","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/global-vmware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-20T17:44:53.000Z","updated_at":"2025-03-13T21:22:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"d70c5143-f7fa-4919-9aef-3b61a0108a0d","html_url":"https://github.com/global-vmware/vcd_vapp_vm","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/global-vmware%2Fvcd_vapp_vm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/global-vmware%2Fvcd_vapp_vm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/global-vmware%2Fvcd_vapp_vm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/global-vmware%2Fvcd_vapp_vm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/global-vmware","download_url":"https://codeload.github.com/global-vmware/vcd_vapp_vm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245874760,"owners_count":20686830,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["infrastructure-as-code","terraform","terraform-module","vapp","vm","vmware"],"created_at":"2025-03-27T15:47:53.441Z","updated_at":"2025-03-27T15:47:54.089Z","avatar_url":"https://github.com/global-vmware.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Virtual Application VM Terraform Module\n\nThis Terraform module deploys Virtual Machines into an existing Virtual Application (vApp) within a VMware Cloud Director (VCD) Environment, allowing VMs to boot from an ISO media source. This module can be used to provision new Virtual Machines into [Rackspace Technology SDDC Flex](https://www.rackspace.com/cloud/private/software-defined-data-center-flex) VCD Data Center Regions.\n\n## Requirements\n\n| Name | Version |\n|------|---------|\n| terraform | ~\u003e 1.5 |\n| vcd | ~\u003e 3.9 |\n\nThis Module depends on a vApp already being created in your Virtual Data Center. You can use the [vcd_vapp](https://github.com/global-vmware/vcd_vapp) Module to create the vApp that will be used to provision your VMs into.\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [vcd_vdc_group](https://registry.terraform.io/providers/vmware/vcd/latest/docs/data-sources/vdc_group) | data source |\n| [vcd_nsxt_edgegateway](https://registry.terraform.io/providers/vmware/vcd/latest/docs/data-sources/nsxt_edgegateway) | data source |\n| [vcd_network_routed_v2](https://registry.terraform.io/providers/vmware/vcd/latest/docs/data-sources/network_routed_v2) | data source |\n| [vcd_network_isolated_v2](https://registry.terraform.io/providers/vmware/vcd/latest/docs/data-sources/network_isolated_v2) | data source |\n| [vcd_vm_sizing_policy](https://registry.terraform.io/providers/vmware/vcd/latest/docs/data-sources/vm_sizing_policy) | data source |\n| [vcd_catalog](https://registry.terraform.io/providers/vmware/vcd/latest/docs/data-sources/catalog) | data source |\n| [vcd_catalog_vapp_template](https://registry.terraform.io/providers/vmware/vcd/latest/docs/data-sources/catalog_vapp_template) | data source |\n| [vcd_catalog_media](https://registry.terraform.io/providers/vmware/vcd/latest/docs/data-sources/catalog_media) | data source |\n| [vcd_vapp](https://registry.terraform.io/providers/vmware/vcd/latest/docs/data-sources/vapp) | data source |\n| [vcd_vapp_org_network](https://registry.terraform.io/providers/vmware/vcd/latest/docs/data-sources/vapp_org_network) | data source |\n| [vcd_inserted_media](https://registry.terraform.io/providers/vmware/vcd/latest/docs/resources/inserted_media) | resource |\n| [vcd_vm_internal_disk](https://registry.terraform.io/providers/vmware/vcd/latest/docs/resources/vm_internal_disk) | resource |\n| [vcd_vapp_vm](https://registry.terraform.io/providers/vmware/vcd/latest/docs/resources/vapp_vm) | resource |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|----------|\n| vdc_org_name | The name of the Data Center Group Organization in VCD | string | `\"Organization Name Format: \u003cAccount_Number\u003e-\u003cRegion\u003e-\u003cAccount_Name\u003e\"` | yes |\n| vdc_group_name | The name of the Data Center Group in VCD | string | `\"Data Center Group Name Format: \u003cAccount_Number\u003e-\u003cRegion\u003e-\u003cAccount_Name\u003e \u003cdatacenter group\u003e\"` | yes |\n| vdc_name | Cloud Director VDC Name | string | `\"Virtual Data Center Name Format: \u003cAccount_Number\u003e-\u003cRegion\u003e-\u003cVDC_Name\u003e\"` | Yes |\n| vcd_edge_name | Name of the Data Center Group Edge Gateway | string | `\"Edge Gateway Name Format: \u003cAccount_Number\u003e-\u003cRegion\u003e-\u003cEdge_GW_Identifier\u003e-\u003cedge\u003e\"` | Yes |\n| vm_sizing_policy_name | Cloud Director VM Sizing Policy Name | string | `\"gp2.4\"` | no |\n| vapp_org_networks | List of vApp Org networks with their types | list(object) | `[]` | yes |\n| is_fenced | Enable fencing for vApp networks | bool | `false` | no |\n| retain_ip_mac_enabled | Retain IP/MAC across deployments | bool | `false` | no |\n| reboot_vapp_on_removal | Reboot vApp on network removal | bool | `true` | no |\n| catalog_org_name | Cloud Director Organization Name for Catalog | string | `\"\"` | yes |\n| catalog_name | Cloud Director Catalog Name | string | `\"\"` | yes |\n| catalog_template_name | Catalog template name for VMs | string | `\"\"` | yes |\n| boot_catalog_org_name | Organization name for boot catalog | string | `\"\"` | no |\n| boot_catalog_name | Catalog name for boot media | string | `\"\"` | no |\n| boot_iso_image_name | ISO name for boot image | string | `\"\"` | no |\n| inserted_media_iso_name | ISO name for inserted boot media | string | `\"\"` | no |\n| inserted_media_eject_force | Force eject ISO if locked | bool | `true` | no |\n| vapp_name | Cloud Director vApp Name | string | `\"Production Application vApp\"` | yes |\n| vm_name | List of VM names | list(string) | `[]` | yes |\n| vm_name_format | Format for VM names | string | `\"%s %02d\"` | no |\n| computer_name | List of computer names | list(string) | `[]` | yes |\n| computer_name_format | Format for computer names | string | `\"%s-%02d\"` | no |\n| vm_cpu_hot_add_enabled | Enable hot add for CPUs | bool | `false` | no |\n| vm_memory_hot_add_enabled | Enable hot add for memory | bool | `false` | no |\n| vm_min_cpu | Minimum CPUs per VM | number | `2` | no |\n| vm_os_type | OS type for the VM | string | `\"\"` | no |\n| vm_hw_version | VM hardware version | string | `\"\"` | no |\n| vm_firmware | VM firmware type (BIOS or UEFI) | string | `\"bios\"` | no |\n| vm_boot_delay | Boot delay in milliseconds | number | `0` | no |\n| vm_boot_retry_enabled | Enable boot retry | bool | `false` | no |\n| vm_boot_retry_delay | Boot retry delay in milliseconds | number | `0` | no |\n| vm_efi_secure_boot | Enable EFI secure boot | bool | `false` | no |\n| vm_enter_bios_setup_on_next_boot | Enter BIOS setup on next boot | bool | `false` | no |\n| vm_count | Number of VMs to create | number | `2` | no |\n| vm_metadata_entries | List of metadata entries for the VM | list(object({ key = string, value = string, type = string, user_access = string, is_system = bool })) | `[{ key = \"Built By\", value = \"Terraform\", type = \"MetadataStringValue\", user_access = \"READWRITE\", is_system = false }, { key = \"Operating System\", value = \"Ubuntu Linux (64-Bit)\", type = \"MetadataStringValue\", user_access = \"READWRITE\", is_system = false }, { key = \"Server Role\", value = \"Web Server\", type = \"MetadataStringValue\", user_access = \"READWRITE\", is_system = false }]` | No |\n| disks_per_vm | Number of named disks per VM | number | `0` | no |\n| vm_disks | List of named disks per VM | list(object) | `[]` | no |\n| internal_disks | List of internal disks for VMs | list(object) | `[]` | no |\n| vm_internal_disk_allow_vm_reboot | Allow reboot when adding disks | bool | `true` | no |\n| network_interfaces | Network interfaces for VMs | list(object) | `[]` | no |\n| vm_ips_index_multiplier | Multiplier for IP assignment | number | `1` | no |\n| vm_ips | List of IPs for VMs | list(string) | `[\"\"]` | no |\n| override_template_disks | Override template disks | list(object) | `[]` | no |\n| vm_customization_enabled | Enable guest customization | bool | `true` | no |\n| vm_customization_force | Force guest customization | bool | `false` | no |\n| vm_customization_change_sid | Change SID for Windows VMs | bool | `true` | no |\n| vm_customization_allow_local_admin_password | Allow local admin password | bool | `true` | no |\n| vm_customization_must_change_password_on_first_login | Require password change on first login | bool | `false` | no |\n| vm_customization_auto_generate_password | Auto-generate admin password | bool | `true` | no |\n| vm_customization_admin_password | Admin password for VMs | string | `null` | no |\n| vm_customization_number_of_auto_logons | Number of auto logons | number | `0` | no |\n| vm_customization_join_domain | Join VMs to domain | bool | `false` | no |\n| vm_customization_initscript | Init script for VMs | string | `null` | no |\n\n`NOTE:` Each object in the `vm_metadata_entries` list must have the following attributes:\n\n`key:` The key for the metadata entry.\n`value:` The value for the metadata entry.\n`type:` The type of the metadata value. The acceptable values are `\"MetadataStringValue\"`, `\"MetadataNumberValue\"`, `\"MetadataDateTimeValue\"`, `\"MetadataBooleanValue\"`.\n`user_access:` The level of access granted to users for this metadata entry. The acceptable values are `\"READONLY\"`, `\"READWRITE\"`.\n`is_system:` Specifies whether the metadata is system-generated or not. The acceptable values are `true`, `false`.\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| all_vm_info | An array of objects containing information about each VM.  This includes VM Name, IP's, Computer Name, Metadata Entries, VM Sizing Policy and Named Disks that were configured on the VM.|\n| internal_disks | An array of objects containing information about each Internal Disk that was added to a VM.  This includes VM Name, Disk Size, Disk Bus Number, Disk Unit Number, Disk Bus Type and the Storage Profile for those Internal Disks.|\n| vm_count | The number of VMs created. |\n\n## Example Usage\n\nThis is an example of a `main.tf` file that would use the `\"github.com/global-vmware/vcd_vapp_vm\"` Module Source to deploy Virtual Machines into an existing Virtual Application (vApp).\n\nThe Terraform code example for the main.tf file is below:\n\n```terraform\nmodule \"vcd_vapp_vm\" {\n  source                            = \"github.com/global-vmware/vcd_vapp_vm.git?ref=v3.0.1\"\n\n  vdc_org_name                      = \"\u003cUS1-VDC-ORG-NAME\u003e\"\n  vdc_group_name                    = \"\u003cUS1-VDC-GRP-NAME\u003e\"\n  vdc_name                          = \"\u003cUS1-VDC-NAME\u003e\"\n  vdc_edge_name                     = \"\u003cUS1-VDC-EDGE-NAME\u003e\"\n\n  catalog_org_name                  = \"\u003cUS1-CATALOG-ORG-NAME\u003e\"\n  catalog_name                      = \"\u003cUS1-CATALOG-NAME\u003e\"\n  \n  catalog_template_name             = \"\u003cUS1-CATALOG-TEMPLATE-NAME\u003e\"\n\n  vm_sizing_policy_name             = \"gp4.8\"\n  vm_min_cpu                        = \"4\"\n\n  vm_count                          = 2\n\n  vapp_name                         = \"My Production Application\"\n\n  vapp_org_networks                 = [\n    { name = \"US1-Segment-01\", type = \"routed\" },\n    { name = \"US1-Segment-02\", type = \"routed\" }\n  ]\n\n  vm_name                           = [\"Production App Web Server\"]\n  vm_name_format                    = \"%s %02d\"\n  \n  computer_name                     = [\"pd-app-web\"]\n  computer_name_format              = \"%s-%02d\"\n\n  vm_metadata_entries               = [\n    {\n      key         = \"Cost Center\"\n      value       = \"IT Department - 1001\"\n      type        = \"MetadataStringValue\"\n      user_access = \"READWRITE\"\n      is_system   = false\n    },\n    {\n      key         = \"Operating System\"\n      value       = \"Ubuntu Linux (64-Bit)\"\n      type        = \"MetadataStringValue\"\n      user_access = \"READWRITE\"\n      is_system   = false\n    }\n  ]\n  \n  network_interfaces      = [\n    {\n    type                  = \"org\"\n    adapter_type          = \"VMXNET3\"\n    name                  = \"US1-Segment-01\"\n    ip_allocation_mode    = \"POOL\"\n    ip                    = \"\"\n    is_primary            = true\n    },\n    {\n    type                  = \"org\"\n    adapter_type          = \"VMXNET3\"\n    name                  = \"US1-Segment-02\"\n    ip_allocation_mode    = \"POOL\"\n    ip                    = \"\"\n    is_primary            = false\n    }\n  ]\n\n  internal_disks  = [\n    {\n      size_in_mb      = 32768\n      bus_number      = 0\n      unit_number     = 1\n      bus_type        = \"paravirtual\"\n      iops            = 0\n      storage_profile = \"Performance\"\n    },\n    {\n      size_in_mb      = 32768\n      bus_number      = 0\n      unit_number     = 2\n      bus_type        = \"paravirtual\"\n      iops            = 0\n      storage_profile = \"Capacity\"\n    }\n  ]\n}\n```\n\n## Authors\n\nThis module is maintained by the [Global VMware Cloud Automation Services Team](https://github.com/global-vmware).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglobal-vmware%2Fvcd_vapp_vm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglobal-vmware%2Fvcd_vapp_vm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglobal-vmware%2Fvcd_vapp_vm/lists"}