Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data/data/baremetal/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module "bootstrap" {
source = "./bootstrap"

cluster_id = var.cluster_id
image = var.os_image
image = var.bootstrap_os_image
ignition = var.ignition_bootstrap
external_bridge = var.external_bridge
provisioning_bridge = var.provisioning_bridge
Expand Down
4 changes: 2 additions & 2 deletions data/data/baremetal/variables-baremetal.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ variable "libvirt_uri" {
description = "libvirt connection URI"
}

variable "os_image" {
variable "bootstrap_os_image" {
type = string
description = "The URL of the OS disk image"
description = "The URL of the bootstrap OS disk image"
}

variable "external_bridge" {
Expand Down
10 changes: 5 additions & 5 deletions pkg/tfvars/baremetal/baremetal.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
type config struct {
LibvirtURI string `json:"libvirt_uri,omitempty"`
IronicURI string `json:"ironic_uri,omitempty"`
Image string `json:"os_image,omitempty"`
BootstrapOSImage string `json:"bootstrap_os_image,omitempty"`
ExternalBridge string `json:"external_bridge,omitempty"`
ProvisioningBridge string `json:"provisioning_bridge,omitempty"`

Expand All @@ -26,10 +26,10 @@ type config struct {
}

// TFVars generates bare metal specific Terraform variables.
func TFVars(libvirtURI, ironicURI, osImage, externalBridge, provisioningBridge string, platformHosts []*baremetal.Host, image baremetal.Image) ([]byte, error) {
osImage, err := libvirttfvars.CachedImage(osImage)
func TFVars(libvirtURI, ironicURI, bootstrapOSImage, externalBridge, provisioningBridge string, platformHosts []*baremetal.Host, image baremetal.Image) ([]byte, error) {
bootstrapOSImage, err := libvirttfvars.CachedImage(bootstrapOSImage)
if err != nil {
return nil, errors.Wrap(err, "failed to use cached libvirt image")
return nil, errors.Wrap(err, "failed to use cached bootstrap libvirt image")
}

var hosts, rootDevices, properties, driverInfos, instanceInfos []map[string]interface{}
Expand Down Expand Up @@ -96,7 +96,7 @@ func TFVars(libvirtURI, ironicURI, osImage, externalBridge, provisioningBridge s
cfg := &config{
LibvirtURI: libvirtURI,
IronicURI: ironicURI,
Image: osImage,
BootstrapOSImage: bootstrapOSImage,
ExternalBridge: externalBridge,
ProvisioningBridge: provisioningBridge,
Hosts: hosts,
Expand Down