add specific subnet for nodepool

This commit is contained in:
jodhi
2022-02-26 01:16:38 +07:00
parent b5039e2bc1
commit c9101824fc
10 changed files with 62 additions and 31 deletions

View File

@@ -65,6 +65,7 @@ resource "hcloud_server" "server" {
}
resource "hcloud_server_network" "server" {
server_id = hcloud_server.server.id
network_id = var.network_id
ip = var.private_ip
server_id = hcloud_server.server.id
subnet_id = var.subnet_id
}

View File

@@ -54,9 +54,14 @@ variable "location" {
type = string
}
variable "network_id" {
description = "The network or subnet id"
type = number
variable "subnet_id" {
description = "The subnet id"
type = string
}
variable "private_ip" {
description = "Private IP for the server"
type = string
}
variable "server_type" {