This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Author: Jon Howe | |
# Blog: https://www.virtjunkie.com/vmware-provisioning-using-hashicorp-terraform-part-2/ | |
# GitHub: https://github.com/jonhowe/Terraform-vSphere-VirtualMachine/blob/master/output.tf | |
output "DC_ID" { | |
description = "id of vSphere Datacenter" | |
value = data.vsphere_datacenter.dc.id | |
} | |
output "Windows-VM" { | |
description = "VM Names" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Author: Jon Howe | |
# Blog: https://www.virtjunkie.com/vmware-provisioning-using-hashicorp-terraform-part-2/ | |
# GitHub: https://github.com/jonhowe/Terraform-vSphere-VirtualMachine/blob/master/variables.tf | |
variable "vsphere_server" { | |
description = "vsphere server for the environment - EXAMPLE: vcenter01.hosted.local" | |
} | |
variable "vsphere_user" { | |
description = "vsphere server for the environment - EXAMPLE: vsphereuser" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Author: Jon Howe | |
# Blog: https://www.virtjunkie.com/vmware-provisioning-using-hashicorp-terraform-part-2/ | |
# GitHub: https://github.com/jonhowe/Terraform-vSphere-VirtualMachine/blob/master/main.tf | |
# Vcenter connection parameters | |
provider "vsphere" { | |
user = var.vsphere_user | |
password = var.vsphere_password | |
vsphere_server = var.vsphere_server | |
allow_unverified_ssl = true | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This requires powervra | |
#documentation: https://jakkulabs.github.io/PowervRA/#powervra-3x | |
Install-Module -Name PowervRA -RequiredVersion 3.7.0 -Scope CurrentUser | |
#connect to source vra instance | |
Connect-vRAServer -Server source-vra-instance.fq.dn -Username "user" -IgnoreCertRequirements | |
#store the property group to a csv file | |
$propertygroup = Get-vRAPropertyDefinition -Id propertygroupid |
NewerOlder