Created
October 9, 2018 21:28
-
-
Save 8bitnz/5aefb71c572d3bf8f4da75490ad2a490 to your computer and use it in GitHub Desktop.
vCD Create vApp and VM resources fails to complete
This file contains 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
# VMware vCloud Director Provider Variables (Blank) | |
variable "vcd_user" { | |
description = "vCD Tenant User" | |
} | |
variable "vcd_pass" { | |
description = "vCD Tenant Password" | |
} | |
variable "vcd_org" { | |
description = "vCD Tenant Org" | |
} | |
variable "vcd_url" { | |
description = "vCD Tenant URL" | |
} | |
variable "vcd_vdc" { | |
description = "vCD Tenant VDC" | |
} | |
variable "vcd_max_retry_timeout" { | |
description = "Retry Timeout" | |
default = "240" | |
} | |
# VMware vCloud Director Provider Configuration | |
provider "vcd" { | |
user = "${var.vcd_user}" | |
password = "${var.vcd_pass}" | |
org = "${var.vcd_org}" | |
url = "${var.vcd_url}" | |
vdc = "${var.vcd_vdc}" | |
max_retry_timeout = "${var.vcd_max_retry_timeout}" | |
} | |
# VMware vCloud Director Network Variables (Blank) | |
variable "vcd_edge" { | |
description = "vCD Tenant Edge Gateway" | |
} | |
# VMware vCloud Director Network Resource Definition | |
resource "vcd_network" "ajs-tf-net" { | |
name = "ajs-my-tf-net" | |
edge_gateway = "${var.vcd_edge}" | |
gateway = "172.21.0.1" | |
dhcp_pool { | |
start_address = "172.21.0.10" | |
end_address = "172.21.0.50" | |
} | |
static_ip_pool { | |
start_address = "172.21.0.100" | |
end_address = "172.21.0.200" | |
} | |
} | |
# VMware vCloud Director vApp Variables (Blank) | |
variable "vcd_catalog" { | |
description = "vCD Catalog Name" | |
} | |
# VMware vCloud Director vApp Ressource Definition | |
resource "vcd_vapp" "ajs-tf-vapp" { | |
name = "ajs-tf-vapp" | |
catalog_name = "${var.vcd_catalog}" | |
template_name = "centos-7x" | |
memory = 2048 | |
cpus = 2 | |
network_name = "${vcd_network.ajs-tf-net.name}" | |
power_on = false | |
} | |
resource "vcd_vapp_vm" "ajs-tf-vapp-add-1" { | |
vapp_name = "${vcd_vapp.ajs-tf-vapp.name}" | |
name = "ajs-tf-vapp-add-1" | |
catalog_name = "${var.vcd_catalog}" | |
template_name = "centos-7x" | |
memory = 2048 | |
cpus = 1 | |
ip = "172.21.0.100" | |
power_on = false | |
} | |
vcd_user = "######" | |
vcd_org = "ENG" | |
vcd_vdc = "CHC ENG Allocated" | |
vcd_url = "https://####.######.##.##/api" | |
vcd_edge = "CHC_ENG_Edge" | |
vcd_catalog = "Shared Public" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment