Created
December 3, 2017 21:05
-
-
Save nicolai86/5b93de5f0e6a7f7051d5e1462740a6ca to your computer and use it in GitHub Desktop.
first run missing output
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "scaleway" {} | |
variable "commercial_type" { | |
default = "C1" | |
} | |
variable "architectures" { | |
default = { | |
C1 = "arm" | |
VC1S = "x86_64" | |
VC1M = "x86_64" | |
VC1L = "x86_64" | |
C2S = "x86_64" | |
C2M = "x86_64" | |
C2L = "x86_64" | |
} | |
} | |
data "scaleway_image" "ubuntu" { | |
architecture = "${lookup(var.architectures, var.commercial_type)}" | |
name = "Ubuntu Xenial" | |
} | |
resource "scaleway_server" "node" { | |
count = "2" | |
name = "cluser-node-${count.index + 1}" | |
image = "${data.scaleway_image.ubuntu.id}" | |
type = "${var.commercial_type}" | |
tags = ["TEST"] | |
} | |
resource "scaleway_ip" "public_ip" { | |
count = "2" | |
server = "${element(scaleway_server.node.*.id, count.index)}" | |
} | |
output "public_ips" { | |
value = "${scaleway_server.node.*.public_ip}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment