mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-06-23 05:34:27 -04:00
Remove exposure of qemu ip_range_start value
This commit is contained in:
parent
ed78c48ed4
commit
ccbc3d9123
9 changed files with 17 additions and 42 deletions
|
@ -25,7 +25,7 @@ provider "docker" {
|
|||
}
|
||||
|
||||
resource "docker_image" "qemu-metadata" {
|
||||
name = "${var.metadata_api_image}"
|
||||
name = var.metadata_api_image
|
||||
keep_locally = true
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@ resource "docker_container" "qemu-metadata" {
|
|||
image = docker_image.qemu-metadata.latest
|
||||
network_mode = "host"
|
||||
rm = true
|
||||
command = [
|
||||
command = [
|
||||
"--network",
|
||||
"${var.name}-network",
|
||||
]
|
||||
|
@ -52,7 +52,6 @@ module "control_plane" {
|
|||
vcpus = var.vcpus
|
||||
memory = var.memory
|
||||
state_disk_size = var.state_disk_size
|
||||
ip_range_start = var.ip_range_start
|
||||
cidr = "10.42.1.0/24"
|
||||
network_id = libvirt_network.constellation.id
|
||||
pool = libvirt_pool.cluster.name
|
||||
|
@ -68,7 +67,6 @@ module "worker" {
|
|||
vcpus = var.vcpus
|
||||
memory = var.memory
|
||||
state_disk_size = var.state_disk_size
|
||||
ip_range_start = var.ip_range_start
|
||||
cidr = "10.42.2.0/24"
|
||||
network_id = libvirt_network.constellation.id
|
||||
pool = libvirt_pool.cluster.name
|
||||
|
|
|
@ -9,6 +9,7 @@ terraform {
|
|||
|
||||
locals {
|
||||
state_disk_size_byte = 1073741824 * var.state_disk_size
|
||||
ip_range_start = 100
|
||||
}
|
||||
|
||||
resource "libvirt_domain" "instance_group" {
|
||||
|
@ -44,7 +45,7 @@ resource "libvirt_domain" "instance_group" {
|
|||
network_interface {
|
||||
network_id = var.network_id
|
||||
hostname = "${var.role}-${count.index}"
|
||||
addresses = [cidrhost(var.cidr, var.ip_range_start + count.index)]
|
||||
addresses = [cidrhost(var.cidr, local.ip_range_start + count.index)]
|
||||
wait_for_lease = true
|
||||
}
|
||||
console {
|
||||
|
|
|
@ -18,11 +18,6 @@ variable "state_disk_size" {
|
|||
description = "size of state disk (GiB)"
|
||||
}
|
||||
|
||||
variable "ip_range_start" {
|
||||
type = number
|
||||
description = "first ip address to use within subnet"
|
||||
}
|
||||
|
||||
variable "cidr" {
|
||||
type = string
|
||||
description = "subnet to use for dhcp"
|
||||
|
|
|
@ -34,11 +34,6 @@ variable "state_disk_size" {
|
|||
description = "size of state disk (GiB)"
|
||||
}
|
||||
|
||||
variable "ip_range_start" {
|
||||
type = number
|
||||
description = "first ip address to use within subnet"
|
||||
}
|
||||
|
||||
variable "machine" {
|
||||
type = string
|
||||
default = "q35"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue