Created
December 5, 2018 14:13
-
-
Save gpetrousov/e5a35b74191fb7ae2f5f61b6ec201c14 to your computer and use it in GitHub Desktop.
Terraform config for using vCloud
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
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}" | |
allow_unverified_ssl = "${var.vcd_allow_unverified_ssl}" | |
} | |
resource "vcd_vapp" "terravapp" { | |
name = "godzilla" | |
network_name = "${var.network_name}" | |
} | |
resource "vcd_vapp_vm" "terravm0" { | |
vapp_name = "${vcd_vapp.terravapp.name}" | |
catalog_name = "${var.cat_name}" | |
template_name = "${var.template_name}" | |
network_name = "${var.net_name}" | |
name = "terravm-zero" | |
memory = 2048 | |
cpus = 1 | |
ip = "192.168.109.27" | |
power_on = "true" | |
} | |
resource "vcd_dnat" "ssh" { | |
edge_gateway = "${var.edge_gw}" | |
external_ip = "144.2.51.39" | |
port = "51000" | |
internal_ip = "192.168.109.27" | |
translated_port = "22" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment