{"id":18363437,"url":"https://github.com/stuttgart-things/vsphere-vm","last_synced_at":"2025-10-05T00:45:06.769Z","repository":{"id":150837766,"uuid":"608993832","full_name":"stuttgart-things/vsphere-vm","owner":"stuttgart-things","description":"terraform module for building vsphere vms (based on an existing vcenter templates)","archived":false,"fork":false,"pushed_at":"2024-12-17T06:17:41.000Z","size":62,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-05T00:45:06.087Z","etag":null,"topics":["module","terraform","vm","vmware","vsphere"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stuttgart-things.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-03-03T06:32:23.000Z","updated_at":"2024-05-05T17:42:47.000Z","dependencies_parsed_at":"2024-04-03T15:46:43.557Z","dependency_job_id":"24f734a7-3e03-42f5-9170-882164714a76","html_url":"https://github.com/stuttgart-things/vsphere-vm","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/stuttgart-things/vsphere-vm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuttgart-things%2Fvsphere-vm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuttgart-things%2Fvsphere-vm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuttgart-things%2Fvsphere-vm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuttgart-things%2Fvsphere-vm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stuttgart-things","download_url":"https://codeload.github.com/stuttgart-things/vsphere-vm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuttgart-things%2Fvsphere-vm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278395916,"owners_count":25979691,"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","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["module","terraform","vm","vmware","vsphere"],"created_at":"2024-11-05T23:06:30.582Z","updated_at":"2025-10-05T00:45:06.753Z","avatar_url":"https://github.com/stuttgart-things.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stuttgart-things/vsphere-vm\n\nterraform module for building/cloning vsphere vms based on existing vm-templates\n\n## USAGE TERRAFORM CLI\n\n\u003cdetails\u003e\u003csummary\u003e\u003cb\u003eTERRAFORM MODULE CALL\u003c/b\u003e\u003c/summary\u003e\n\nchange the values for the variables according to your vsphere environment and existing vm templates.\n\n```hcl\nmodule \"manager-dev\" {\n  source                 = \"github.com/stuttgart-things/vsphere-vm?ref=v1.7.5-2.7.0\"\n  vm_count               = 1\n  vsphere_vm_name        = \"manager-dev\"\n  vm_memory              = 12288\n  vm_disk_size           = \"128\"\n  vm_num_cpus            = 12\n  firmware               = \"bios\"\n  vsphere_vm_folder_path = \"stuttgart-things/dev\"\n  vsphere_datacenter     = \"/NetApp-HCI-Datacenter\"\n  vsphere_datastore      = \"/NetApp-HCI-Datacenter/datastore/DatastoreCluster/NetApp-HCI-Datastore-02\"\n  vsphere_resource_pool  = \"Resources\"\n  vsphere_network        = \"/NetApp-HCI-Datacenter/network/tiab-prod\"\n  vsphere_vm_template    = \"/NetApp-HCI-Datacenter/vm/stuttgart-things/vm-templates/ubuntu23\"\n  vm_ssh_user            = var.vm_ssh_user\n  vm_ssh_password        = var.vm_ssh_password\n  bootstrap              = [\"echo STUTTGART-THINGS\"]\n  annotation             = \"VSPHERE-VM BUILD w/ TERRAFORM FOR STUTTGART-THINGS\"\n  vsphere_user           = var.vsphere_user\n  vsphere_password       = var.vsphere_password\n  vsphere_server         = var.vsphere_server\n}\n\nvariable \"vsphere_server\" {\n  default     = false\n  description = \"vsphere server\"\n}\n\nvariable \"vsphere_user\" {\n  default     = false\n  description = \"password of vsphere user\"\n}\n\nvariable \"vsphere_password\" {\n  default     = false\n  description = \"password of vsphere user\"\n}\n\nvariable \"vm_ssh_user\" {\n  default     = \"sthings\"\n  description = \"username of ssh user for vm\"\n}\n\nvariable \"vm_ssh_password\" {\n  default     = false\n  description = \"password of ssh user for vm\"\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003cb\u003eEXECUTE TERRAFORM / CREATE VM\u003c/b\u003e\u003c/summary\u003e\n\n```bash\nterraform init\nterraform plan\n\nterraform apply --auto-approve \\\n-var \"vsphere_server=\u003cFQDN\u003e\" \\\n-var \"vm_ssh_user=\u003cUSER\u003e\" \\\n-var \"vm_ssh_password=\u003cPASSWORD\u003e\" \\\n-var \"vsphere_user=\u003cVSPHERE_USER\u003e\" \\\n-var \"vsphere_password=\u003cVSPHERE_PASSWORD\u003e\"\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003cb\u003eDESTROY VM(S)\u003c/b\u003e\u003c/summary\u003e\n\n```bash\nterraform destroy --auto-approve\n```\n\n\u003c/details\u003e\n\n## USAGE CROSSPLANE\n\n\u003cdetails\u003e\u003csummary\u003e\u003cb\u003eCREATE TFVARS AS SECRET\u003c/b\u003e\u003c/summary\u003e\n\n```bash\n# CREATE terraform.tfvars\ncat \u003c\u003cEOF \u003e terraform.tfvars\nvsphere_user = \"\u003cUSER\u003e\"\nvsphere_password = \"\u003cPASSWORD\u003e\"\nvm_ssh_user = \"\u003cSSH_USER\u003e\"\nvm_ssh_password = \"\u003cSSH_PASSWORD\u003e\"\nEOF\n```\n\n```bash\n# CREATE SECRET\nkubectl create secret generic vsphere-tfvars --from-file=terraform.tfvars\n```\n\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\u003csummary\u003e\u003cb\u003eDEFINE (INLINE) WORKSPACE\u003c/b\u003e\u003c/summary\u003e\n\n```yaml\napiVersion: tf.upbound.io/v1beta1\nkind: Workspace\nmetadata:\n  name: vsphere-vm-labda-1\n  annotations:\n    crossplane.io/external-name: vsphere-vm-labda-1\nspec:\n  forProvider:\n    source: Inline\n    module: |\n      module \"labda-vm\" {\n        source = \"github.com/stuttgart-things/vsphere-vm\"\n        vm_count               = 1\n        vsphere_vm_name        = \"michigan3\"\n        vm_memory              = 6144\n        vm_disk_size           = \"64\"\n        vm_num_cpus            = 6\n        firmware               = \"bios\"\n        vsphere_vm_folder_path = \"stuttgart-things/testing\"\n        vsphere_datacenter     = \"/NetApp-HCI-Datacenter\"\n        vsphere_datastore      = \"/NetApp-HCI-Datacenter/datastore/DatastoreCluster/NetApp-HCI-Datastore-02\"\n        vsphere_resource_pool  = \"Resources\"\n        vsphere_network        = \"/NetApp-HCI-Datacenter/network/tiab-prod\"\n        vsphere_vm_template    = \"/NetApp-HCI-Datacenter/vm/stuttgart-things/vm-templates/ubuntu23\"\n        vm_ssh_user            = var.vm_ssh_user\n        vm_ssh_password        = var.vm_ssh_password\n        bootstrap              = [\"echo STUTTGART-THINGS\"]\n        annotation             = \"VSPHERE-VM BUILD w/ TERRAFORM CROSSPLANE PROVIDER FOR STUTTGART-THINGS\"\n      }\n\n      provider \"vsphere\" {\n        user                 = var.vsphere_user\n        password             = var.vsphere_password\n        vsphere_server       = var.vsphere_server\n        allow_unverified_ssl = true\n      }\n\n      variable \"vsphere_server\" {\n        type        = string\n        default     = false\n        description = \"vsphere server\"\n      }\n\n      variable \"vsphere_user\" {\n        type        = string\n        default     = false\n        description = \"password of vsphere user\"\n      }\n\n      variable \"vsphere_password\" {\n        type        = string\n        default     = false\n        description = \"password of vsphere user\"\n      }\n\n      variable \"vm_ssh_user\" {\n        type        = string\n        default     = false\n        description = \"username of ssh user for vm\"\n      }\n\n      variable \"vm_ssh_password\" {\n        type        = string\n        default     = false\n        description = \"password of ssh user for vm\"\n      }\n\n    varFiles:\n      - source: SecretKey\n        secretKeyRef:\n          namespace: default\n          name: vsphere-tfvars\n          key: terraform.tfvars\n  writeConnectionSecretToRef:\n    namespace: default\n    name: terraform-workspace-vsphere-vm-labda-1\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003cb\u003eCREATE WORKSPACE\u003c/b\u003e\u003c/summary\u003e\n\n```bash\nkubectl apply -f \u003cWORKSPACE-DEFINITION\u003e.yaml\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003cb\u003eDELETE WORKSPACE\u003c/b\u003e\u003c/summary\u003e\n\n```bash\nkubectl delete workspace vsphere-vm-labda-1\n```\n\n\u003c/details\u003e\n\n## Author Information\n\n```bash\nPatrick Hermann, stuttgart-things 12/2019\n```\n\n## License\n\nLicensed under the Apache License, Version 2.0 (the \"License\").\n\nYou may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0).\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an _\"AS IS\"_ basis, without WARRANTIES or conditions of any kind, either express or implied.\n\nSee the License for the specific language governing permissions and limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstuttgart-things%2Fvsphere-vm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstuttgart-things%2Fvsphere-vm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstuttgart-things%2Fvsphere-vm/lists"}