From d9cddb31f044e8c0aea62f79e120bf4ce61101ed Mon Sep 17 00:00:00 2001 From: Khue Doan Date: Mon, 20 Jul 2020 14:07:41 +0700 Subject: [PATCH] Add network --- terraform/main.tf | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/terraform/main.tf b/terraform/main.tf index ca127af7..a47f0bae 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -1,10 +1,21 @@ provider "lxd" { + generate_client_certificates = true + accept_remote_certificate = true +} + +resource "lxd_network" "kubernetes_subnetwork" { + name = "kubernetes" + + config = { + "ipv4.address" = "10.150.19.1/24" + "ipv4.nat" = "true" + } } resource "lxd_container" "test1" { - name = "test1" - remote = "images" - image = "ubuntu/18.04" + count = 3 + name = "test-${count.index}" + image = "images:ubuntu/18.04" ephemeral = false config = {