42 lines
958 B
Terraform
42 lines
958 B
Terraform
|
provider "scaleway" {
|
||
|
organization = "${var.organization}"
|
||
|
token = "${var.token}"
|
||
|
region = "${var.region}"
|
||
|
}
|
||
|
|
||
|
resource "scaleway_ip" "debian_ip" {
|
||
|
count = "${var.count}"
|
||
|
server = "${element(scaleway_server.debian.*.id, count.index)}"
|
||
|
}
|
||
|
|
||
|
resource "scaleway_ip" "centos_ip" {
|
||
|
count = "${var.count}"
|
||
|
server = "${element(scaleway_server.centos.*.id, count.index)}"
|
||
|
}
|
||
|
|
||
|
resource "scaleway_server" "debian" {
|
||
|
count = "${var.count}"
|
||
|
name = "${var.server_name["debian"]}-${count.index}.theo-andreou.org"
|
||
|
image = "${var.images["debian"]}"
|
||
|
type = "${var.type}"
|
||
|
tags = [ "lpi", "debian" ]
|
||
|
|
||
|
volume {
|
||
|
size_in_gb = 50
|
||
|
type = "l_ssd"
|
||
|
}
|
||
|
}
|
||
|
|
||
|
resource "scaleway_server" "centos" {
|
||
|
count = "${var.count}"
|
||
|
name = "${var.server_name["centos"]}-${count.index}.theo-andreou.org"
|
||
|
image = "${var.images["centos"]}"
|
||
|
type = "${var.type}"
|
||
|
tags = [ "lpi", "centos" ]
|
||
|
|
||
|
volume {
|
||
|
size_in_gb = 50
|
||
|
type = "l_ssd"
|
||
|
}
|
||
|
}
|