Jakub Sokołowski
68ac26a342
Signed-off-by: Jakub Sokołowski <jakub@status.im> |
||
---|---|---|
README.md | ||
main.tf | ||
module_ac.tf | ||
module_do.tf | ||
module_gc.tf | ||
outputs.tf | ||
variables.tf | ||
versions.tf |
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
.
Variables
- General
name
- Prefix of hostname before index. (default:node
)env
- Environment for these hosts, affects DNS entries.stage
- Name of stage, likeprod
,dev
, orstaging
.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 forstatus.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
)