mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-25 05:36:59 +01:00
27 lines
841 B
HCL
27 lines
841 B
HCL
data "scaleway_image" "ubuntu" {
|
|
architecture = var.architecture
|
|
name = var.image
|
|
}
|
|
|
|
resource "scaleway_server" "node" {
|
|
count = var.node_instance_count
|
|
name = "node${count.index + 1}"
|
|
image = data.scaleway_image.ubuntu.id
|
|
type = var.node_instance_type
|
|
state = "running"
|
|
dynamic_ip_required = true
|
|
tags = ["${local.environment}-node"]
|
|
}
|
|
|
|
resource "scaleway_server" "master" {
|
|
count = var.master_instance_count
|
|
name = "master${count.index + 1}"
|
|
image = data.scaleway_image.ubuntu.id
|
|
type = var.master_instance_type
|
|
state = "running"
|
|
dynamic_ip_required = true
|
|
tags = [
|
|
"${local.environment}-master",
|
|
"${local.environment}-etcd",
|
|
]
|
|
}
|