Skip to content
Snippets Groups Projects
Verified Commit d91d1fb6 authored by Rafael László's avatar Rafael László :speech_balloon:
Browse files

Add simple example and vlan 51

parent 94f79f77
No related branches found
No related tags found
No related merge requests found
...@@ -54,6 +54,10 @@ data "vsphere_datastore" "N4_SSD-01" { ...@@ -54,6 +54,10 @@ data "vsphere_datastore" "N4_SSD-01" {
# * Network # * Network
data "vsphere_network" "dvPG-051-KSZK" {
name = "dvPG-051-KSZK"
datacenter_id = data.vsphere_datacenter.dc.id
}
data "vsphere_network" "dvPG-151-Internal" { data "vsphere_network" "dvPG-151-Internal" {
name = "dvPG-151-Internal" name = "dvPG-151-Internal"
datacenter_id = data.vsphere_datacenter.dc.id datacenter_id = data.vsphere_datacenter.dc.id
......
# This is a simple vm definition which uses cloud-init
resource "vsphere_virtual_machine" "simple" {
name = "simple"
# Get your resource pool in the data.tf file
resource_pool_id = data.vsphere_resource_pool.simple.id
guest_id = "ubuntu64Guest"
num_cpus = 1
memory = 1024
firmware = "efi"
# Use the folder that you got access to
folder = "simple"
wait_for_guest_net_timeout = 0 # Don't wait for the network
wait_for_guest_ip_timeout = 0 # Don't wait for the network interface to get ip
sync_time_with_host = true
sync_time_with_host_periodically = false
datastore_cluster_id = data.vsphere_datastore_cluster.SCH-Cluster-FujiStorage.id
# Clone the existing cloudinit template vm
clone {
template_uuid = data.vsphere_virtual_machine.ubuntu2004-cloud-init.id
}
vapp {
properties = {
public-keys = null
hostname = "alma" # Hostname for the vm
instance-id = "alma" # Instance id for the vm, should be unique, so use the hostname
password = "Password"
user-data = null # Cloudinit configuration in base64. You can do something like base64encode(file(filepath))
}
}
network_interface {
network_id = data.vsphere_network.dvPG-051-KSZK.id
use_static_mac = false
}
disk {
size = 16
thin_provisioned = false
}
cdrom {
client_device = true # CDRom should be mounted when using cloud-init
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment