create avax-faucet.infra.status.im for node-01

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2021-02-22 15:14:33 +01:00
parent b195e9c0b2
commit ac8a5b3ed7
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
3 changed files with 27 additions and 3 deletions

View File

@ -1,4 +1,5 @@
---
open_ports_default_comment: 'Avalanche'
open_ports_list:
- { port: 9653, protocol: 'tcp' }
- { port: 80, protocol: 'tcp', comment: "Avax Faucet" }
- { port: 443, protocol: 'tcp', comment: "Avax Faucet" }
- { port: 9653, protocol: 'tcp', comment: "Avalanche" }

View File

@ -6,5 +6,13 @@ module "avalanche" {
size = "s-2vcpu-2gb"
domain = var.domain
open_tcp_ports = ["9653"]
open_tcp_ports = ["80", "443", "9653"]
}
resource "cloudflare_record" "notes" {
zone_id = local.zones["status.im"]
name = "avax-faucet.infra"
type = "A"
proxied = false
value = module.avalanche.public_ips[0]
}

15
main.tf
View File

@ -12,3 +12,18 @@ terraform {
key_file = "ansible/files/consul-client.key"
}
}
/* CF Zones ------------------------------------*/
/* CloudFlare Zone IDs required for records */
data "cloudflare_zones" "active" {
filter { status = "active" }
}
/* For easier access to zone ID by domain name */
locals {
zones = {
for zone in data.cloudflare_zones.active.zones:
zone.name => zone.id
}
}