Skip to content
This repository has been archived by the owner on Jul 23, 2019. It is now read-only.

Commit

Permalink
vendor: update terraform-provider-ironic to v0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
stbenjam committed May 21, 2019
1 parent f0b27c5 commit aff56c5
Show file tree
Hide file tree
Showing 102 changed files with 4,812 additions and 1,335 deletions.
2 changes: 1 addition & 1 deletion data/data/baremetal/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ provider "libvirt" {

provider "ironic" {
url = "${var.ironic_uri}"
microversion = "1.50"
microversion = "1.52"
}

module "bootstrap" {
Expand Down
47 changes: 31 additions & 16 deletions data/data/baremetal/masters/main.tf
Original file line number Diff line number Diff line change
@@ -1,31 +1,46 @@
resource "ironic_node_v1" "openshift-master" {
count = "${length(keys(var.master_nodes))}"
name = "${lookup(var.master_nodes[format("openshift-master-%d", count.index)], "name")}"
count = "${length(keys(var.master_nodes))}"
name = "${lookup(var.master_nodes[format("openshift-master-%d", count.index)], "name")}"
resource_class = "baremetal"

target_provision_state = "active"
user_data = "${var.ignition}"

root_device = "${var.root_devices[format("openshift-master-%d", count.index)]}"
driver = "${lookup(var.master_nodes[format("openshift-master-%d", count.index)], "driver")}"
driver_info = "${var.driver_infos[format("openshift-master-%d", count.index)]}"
inspect = true
clean = true
available = true

ports = [
{
address = "${lookup(var.master_nodes[format("openshift-master-%d", count.index)], "port_address")}"
address = "${lookup(var.master_nodes[format("openshift-master-%d", count.index)], "port_address")}"
pxe_enabled = "true"
},
]

properties = "${var.properties[format("openshift-master-%d", count.index)]}"
properties = "${var.properties[format("openshift-master-%d", count.index)]}"
root_device = "${var.root_devices[format("openshift-master-%d", count.index)]}"

driver = "${lookup(var.master_nodes[format("openshift-master-%d", count.index)], "driver")}"
driver_info = "${var.driver_infos[format("openshift-master-%d", count.index)]}"

management_interface = "${lookup(var.master_nodes[format("openshift-master-%d", count.index)], "management_interface")}"
power_interface = "${lookup(var.master_nodes[format("openshift-master-%d", count.index)], "power_interface")}"
vendor_interface = "${lookup(var.master_nodes[format("openshift-master-%d", count.index)], "vendor_interface")}"
}

resource "ironic_allocation_v1" "openshift-master-allocation" {
name = "master-${count.index}"
count = 3
resource_class = "baremetal"
candidate_nodes = "${ironic_node_v1.*.id}"
}

resource "ironic_deployment" "masters" {
count = 3
node_uuid = "${element(ironic_allocation_v1.openshift-master-allocation.*.node_uuid, count.index)}"

instance_info = {
image_source = "${var.image_source}"
image_source = "${var.image_source}"
image_checksum = "${var.image_checksum}"
root_gb = "${var.root_gb}"
root_gb = "${var.root_gb}"
}

management_interface = "${lookup(var.master_nodes[format("openshift-master-%d", count.index)], "management_interface")}"
power_interface = "${lookup(var.master_nodes[format("openshift-master-%d", count.index)], "power_interface")}"
vendor_interface = "${lookup(var.master_nodes[format("openshift-master-%d", count.index)], "vendor_interface")}"

user_data = "${var.ignition}"
}
19 changes: 9 additions & 10 deletions data/data/baremetal/masters/variables.tf
Original file line number Diff line number Diff line change
@@ -1,45 +1,44 @@
variable "image_source" {
description = "The URL of the OS disk image"
type = "string"
type = "string"
}

variable "image_checksum" {
type = "string"
type = "string"
description = "The URL or checksum value of the image"
}

variable "root_gb" {
type = "string"
type = "string"
description = "Size of the root disk"
}

variable "root_disk" {
type = "string"
type = "string"
description = "Location of the root disk"
}

variable "ignition" {
type = "string"
type = "string"
description = "The content of the master ignition file"
}

variable "master_nodes" {
type = "map"
type = "map"
description = "Master bare metal node details"
}

variable "properties" {
type = "map"
type = "map"
description = "Master bare metal properties"
}

variable "root_devices" {
type = "map"
type = "map"
description = "Master root device configuration"
}

variable "driver_infos" {
type = "map"
type = "map"
description = "Master driver info"
}

23 changes: 16 additions & 7 deletions pkg/terraform/exec/plugins/Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions pkg/terraform/exec/plugins/Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ ignored = [

[[constraint]]
name = "github.com/terraform-providers/terraform-provider-openstack"
version = "=1.16.0"
branch = "master" # FIXME: Update to 1.19 when it comes out

[[override]]
name = "github.com/coreos/ignition"
version = "=0.23.0"

[[override]]
name = "github.com/gophercloud/gophercloud"
revision = "ff9851476e985a4f27ed846d6babd7b24b763da5"
revision = "7892efa714f10951c5483a28c7471d8051b12975"

[[constraint]]
name = "github.com/terraform-providers/terraform-provider-azurerm"
Expand All @@ -63,4 +63,4 @@ ignored = [

[[constraint]]
name = "github.com/openshift-metalkube/terraform-provider-ironic"
revision = "0538d0a8b33df2c112857649021c558d6375d2c8"
version = "v0.1.1"

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit aff56c5

Please sign in to comment.