Terraform module for multiple cloud providers
Go to file
Jakub Sokołowski 68ac26a342
switch domain from statusim.net to status.im
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2024-03-14 18:30:02 +01:00
README.md switch domain from statusim.net to status.im 2024-03-14 18:30:02 +01:00
main.tf separate different providers into individual files 2021-10-19 18:32:17 +02:00
module_ac.tf bump ac_root_vol_size to 20 to accomodate the OS 2022-10-11 14:09:23 +02:00
module_do.tf rename _size variables to be _type for consistency 2021-10-19 22:52:43 +02:00
module_gc.tf gc: add support for specifying volume types 2022-07-21 15:26:51 +02:00
outputs.tf make providers optional by specifying individual counts 2021-10-19 18:31:55 +02:00
variables.tf switch domain from statusim.net to status.im 2024-03-14 18:30:02 +01:00
versions.tf versions: use looser restriction for terrform 2023-04-05 09:13:26 +02:00

README.md

Description

This is a helper module used by Status internal repos like: infra-hq, infra-misc, infra-eth-cluster, or infra-swarm.

It allows for use of the following three cloud providers via one module:

Usage

Simply import the module using the source directive:

module "appx" {
  source     = "github.com/status-im/infra-tf-multi-provider"

  /* General */
  env   = "appx"
  stage = "prod"
  group = "appx-prod"

  /* Scaling */
  host_count = 2
  do_type    = "s-1vcpu-2gb"
  gc_type    = "n1-standard-1"
  ac_type   = "ecs.sn1ne.large"
  open_ports = ["1234", "2345-3456"]
}

Each cloud provider is optional and can be disabled by setting their respective *_count variable to 0.

More details.

Variables

  • General
    • name - Prefix of hostname before index. (default: node)
    • env - Environment for these hosts, affects DNS entries.
    • stage - Name of stage, like prod, dev, or staging.
    • group - Ansible group to assign hosts to.
  • Security
    • open_tcp_ports - TCP ports to enable access from outside. (default: [])
    • open_udp_ports - UDP ports to enable access from outside. (default: [])
  • DNS
    • cf_zone_id - CloudFlare DNS domain zone ID. (ID for status.im)
    • domain - DNS Domain for hostnames. (default: status.im)
  • Scaling
    • host_count - Number of hosts to run. Overridden by individual provider counts.
    • Alibaba Cloud
      • ac_count - Number of Alibaba Cloud hosts to run.
      • ac_type - Type of host to provision in Alibaba Cloud. (default: ecs.t5-lc1m1.small)
      • ac_root_vol_type - Size in GiB of the host volume. (default: 15)
      • ac_root_vol_size - I/O optimization type of extra data volume. (default: cloud_efficiency)
      • ac_data_vol_type - Size in GiB of extra volume for host. (default: 0)
      • ac_data_vol_size - I/O optimization type of root volume. (default: cloud_ssd)
    • Digital Ocean
      • do_count - Number of Digital Ocean hosts to run.
      • do_type - Type of host to provision in Digital Ocean. (default: s-1vcpu-1gb)
      • do_data_vol_size - Size in GiB of extra volume for host. (default: 0)
    • Google Cloud
      • gc_count - Number of Google Cloud hosts to run.
      • gc_type - Type of host to provision in Google Cloud. (default: n1-standard-1)
      • gc_root_vol_size - Size in GiB of the host volume. (default: 15)
      • gc_data_vol_size - Size in GiB of the extra data volume. (default: 0)