-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3cc276a
commit 97b1b56
Showing
6 changed files
with
143 additions
and
133 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,50 @@ | ||
#### GLOBAL CONFIG DC AND HOST | ||
# Define datacenter | ||
data "vsphere_datacenter" "dc" { | ||
name = "${var.dc}" | ||
} | ||
|
||
# Exctrat data port vlan creation | ||
data "vsphere_host" "host" { | ||
name = "${var.host}" | ||
datacenter_id = "${data.vsphere_datacenter.dc.id}" | ||
} | ||
|
||
data "vsphere_resource_pool" "pool" { | ||
# If you haven't resource pool, put "Resources" after cluster name | ||
name = "${var.cluster}/Resources" | ||
datacenter_id = "${data.vsphere_datacenter.dc.id}" | ||
} | ||
|
||
# Retrieve datastore information on vsphere | ||
data "vsphere_datastore" "datastore_http" { | ||
name = "${var.http_vm_params["disk_datastore"]}" | ||
datacenter_id = "${data.vsphere_datacenter.dc.id}" | ||
} | ||
|
||
# Retrieve datastore information on vsphere | ||
data "vsphere_datastore" "datastore_db" { | ||
name = "${var.db_vm_params["disk_datastore"]}" | ||
datacenter_id = "${data.vsphere_datacenter.dc.id}" | ||
} | ||
|
||
# Retrieve network information on vsphere | ||
data "vsphere_network" "network_http" { | ||
name = "${var.http_network_params["label"]}" | ||
datacenter_id = "${data.vsphere_datacenter.dc.id}" | ||
depends_on = ["vsphere_host_port_group.http_port"] | ||
} | ||
|
||
# Retrieve network information on vsphere | ||
data "vsphere_network" "network_db" { | ||
name = "${var.db_network_params["label"]}" | ||
datacenter_id = "${data.vsphere_datacenter.dc.id}" | ||
depends_on = ["vsphere_host_port_group.db_port"] | ||
} | ||
|
||
# Retrieve template information on vsphere | ||
data "vsphere_virtual_machine" "template" { | ||
name = "${var.template_image}" | ||
datacenter_id = "${data.vsphere_datacenter.dc.id}" | ||
} | ||
#### GLOBAL CONFIG DC AND HOST | ||
# Define datacenter | ||
data "vsphere_datacenter" "dc" { | ||
name = var.dc | ||
} | ||
|
||
# Exctrat data port vlan creation | ||
data "vsphere_host" "host" { | ||
name = var.host | ||
datacenter_id = data.vsphere_datacenter.dc.id | ||
} | ||
|
||
data "vsphere_resource_pool" "pool" { | ||
# If you haven't resource pool, put "Resources" after cluster name | ||
name = "${var.cluster}/Resources" | ||
datacenter_id = data.vsphere_datacenter.dc.id | ||
} | ||
|
||
# Retrieve datastore information on vsphere | ||
data "vsphere_datastore" "datastore_http" { | ||
name = var.http_vm_params["disk_datastore"] | ||
datacenter_id = data.vsphere_datacenter.dc.id | ||
} | ||
|
||
# Retrieve datastore information on vsphere | ||
data "vsphere_datastore" "datastore_db" { | ||
name = var.db_vm_params["disk_datastore"] | ||
datacenter_id = data.vsphere_datacenter.dc.id | ||
} | ||
|
||
# Retrieve network information on vsphere | ||
data "vsphere_network" "network_http" { | ||
name = var.http_network_params["label"] | ||
datacenter_id = data.vsphere_datacenter.dc.id | ||
depends_on = [vsphere_host_port_group.http_port] | ||
} | ||
|
||
# Retrieve network information on vsphere | ||
data "vsphere_network" "network_db" { | ||
name = var.db_network_params["label"] | ||
datacenter_id = data.vsphere_datacenter.dc.id | ||
depends_on = [vsphere_host_port_group.db_port] | ||
} | ||
|
||
# Retrieve template information on vsphere | ||
data "vsphere_virtual_machine" "template" { | ||
name = var.template_image | ||
datacenter_id = data.vsphere_datacenter.dc.id | ||
} | ||
|
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
terraform { | ||
required_version = ">= 0.12" | ||
} |