upgrade to Terraform 0.12

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2019-07-28 18:45:11 -04:00
parent 91cafbb973
commit d314d80c02
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
3 changed files with 32 additions and 28 deletions

View File

@ -9,12 +9,12 @@ endif
PLUGIN_DIR = ~/.terraform.d/plugins
PROVIDER_NAME = terraform-provider-ansible
PROVIDER_VERSION = v0.0.4
PROVIDER_VERSION = v1.0.3
PROVIDER_ARCHIVE = $(PROVIDER_NAME)-$(ARCH).zip
PROVIDER_URL = https://github.com/nbering/terraform-provider-ansible/releases/download/$(PROVIDER_VERSION)/$(PROVIDER_ARCHIVE)
PROVISIONER_NAME = terraform-provisioner-ansible
PROVISIONER_VERSION = v2.0.0
PROVISIONER_VERSION = v2.3.0
PROVISIONER_ARCHIVE = $(PROVISIONER_NAME)-$(subst _,-,$(ARCH))_$(PROVISIONER_VERSION)
PROVISIONER_URL = https://github.com/radekg/terraform-provisioner-ansible/releases/download/$(PROVISIONER_VERSION)/$(PROVISIONER_ARCHIVE)
@ -60,8 +60,6 @@ digitalocean_token = \"$(shell pass cloud/DigitalOcean/token)\"\n\
cloudflare_token = \"$(shell pass cloud/Cloudflare/token)\"\n\
cloudflare_email = \"$(shell pass cloud/Cloudflare/email)\"\n\
cloudflare_org_id = \"$(shell pass cloud/Cloudflare/org_id)\"\n\
alicloud_access_key = \"$(shell pass cloud/Alibaba/access-key)\"\n\
alicloud_secret_key = \"$(shell pass cloud/Alibaba/secret-key)\"\n\
" > terraform.tfvars
cleanup:

50
main.tf
View File

@ -1,20 +1,22 @@
/* DERIVED --------------------------------------*/
/* PROVIDERS ------------------------------------*/
provider "digitalocean" {
token = "${var.digitalocean_token}"
version = "<= 0.1.3"
token = var.digitalocean_token
}
provider "cloudflare" {
email = "${var.cloudflare_email}"
token = "${var.cloudflare_token}"
org_id = "${var.cloudflare_org_id}"
email = var.cloudflare_email
token = var.cloudflare_token
org_id = var.cloudflare_org_id
}
/* DATA -----------------------------------------*/
terraform {
backend "consul" {
address = "https://consul.statusim.net:8400"
lock = true
address = "https://consul.statusim.net:8400"
lock = true
# WARNING This needs to be changed for every repo.
path = "terraform/les/"
ca_file = "ansible/files/consul-ca.crt"
@ -26,23 +28,23 @@ terraform {
/* LES Full Nodes ------------------------------*/
module "les-main" {
source = "github.com/status-im/infra-tf-digital-ocean"
count = 3
env = "main"
group = "main-les"
size = "s-2vcpu-4gb"
vol_size = 800
domain = "${var.domain}"
open_ports = [ "30303-30303" ]
source = "github.com/status-im/infra-tf-digital-ocean"
host_count = 3
env = "main"
group = "main-les"
size = "s-2vcpu-4gb"
vol_size = 800
domain = var.domain
open_ports = ["30303"]
}
module "les-rops" {
source = "github.com/status-im/infra-tf-digital-ocean"
count = 3
env = "rops"
group = "rops-les"
size = "s-2vcpu-4gb"
vol_size = 100
domain = "${var.domain}"
open_ports = [ "30303-30303" ]
source = "github.com/status-im/infra-tf-digital-ocean"
host_count = 3
env = "rops"
group = "rops-les"
size = "s-2vcpu-4gb"
vol_size = 100
domain = var.domain
open_ports = ["30303"]
}

4
versions.tf Normal file
View File

@ -0,0 +1,4 @@
terraform {
required_version = ">= 0.12"
}