Skip to content

insight-w3f/terraform-polkadot-gcp-asg

Repository files navigation

terraform-polkadot-gcp-asg

open-issues open-pr build-status

Features

This module...

Terraform Versions

For Terraform v0.12.0+

Usage

module "network" {
  source   = "github.com/insight-w3f/terraform-polkadot-gcp-network.git?ref=master"
  vpc_name = "cci-test"
}

module "defaults" {
  source                 = "../.."
  node_name              = "sentry"
  relay_node_ip          = "1.2.3.4"
  relay_node_p2p_address = "abcdefg"
  security_group_id      = module.network.sentry_security_group_id[0]
  vpc_id                 = module.network.vpc_id
  network_name           = "dev"
  private_subnet_id      = module.network.private_subnets[0]
  public_subnet_id       = module.network.public_subnets[0]
  public_key_path        = var.public_key_path
  use_lb                 = false

  zone    = var.gcp_zone
  region  = var.gcp_region
  project = var.gcp_project
}

Examples

Known Issues

No issue is creating limit on this module.

Providers

Name Version
google n/a
google-beta n/a
null n/a

Inputs

Name Description Type Default Required
autoscale_enabled Do you want to use autoscaling? bool false no
cluster_name The name of the k8s cluster string "" no
consul_enabled Bool to use when Consul is enabled bool false no
create_eip Boolean to create elastic IP bool false no
environment The environment string "" no
instance_type Instance type string "n1-standard-1" no
lb_name Name of the load balancer string "lb" no
logging_filter String for polkadot logging filter string "sync=trace,afg=trace,babe=debug" no
max_instances If autoscaling enabled; the maxiumum number of instances number 1 no
min_instances If autoscaling enabled; the minimum number of instances number 1 no
monitoring Boolean for cloudwatch bool false no
namespace The namespace to deploy into string "" no
network_name The network name, ie kusama / mainnet string "kusama" no
node_exporter_hash SHA256 hash of Node Exporter binary string "b2503fd932f85f4e5baf161268854bf5d22001869b84f00fd2d1f57b51b72424" no
node_exporter_password Password for node exporter string "node_exporter_password" no
node_exporter_url URL to Node Exporter binary string "https://github.com/prometheus/node_exporter/releases/download/v0.18.1/node_exporter-0.18.1.linux-amd64.tar.gz" no
node_exporter_user User for node exporter string "node_exporter_user" no
node_name Name of the node string n/a yes
num_instances Number of instances for ASG number 1 no
owner Owner of the infrastructure string "" no
polkadot_client_hash SHA256 hash of Polkadot client binary string "c34d63e5d80994b2123a3a0b7c5a81ce8dc0f257ee72064bf06654c2b93e31c9" no
polkadot_client_url URL to Polkadot client binary string "https://github.com/w3f/polkadot/releases/download/v0.7.32/polkadot" no
private_subnet_id The ID of the private subnet to join string n/a yes
project Name of the project for node name string "project" no
prometheus_enabled Bool to use when Prometheus is enabled bool false no
public_key The public ssh key string "" no
public_key_path The public ssh key string "" no
public_subnet_id The ID of the public subnet to join string n/a yes
region The GCP region to deploy in string "us-east1" no
relay_node_ip Internal IP of Polkadot relay node string "" no
relay_node_p2p_address P2P address of Polkadot relay node string "" no
root_volume_size Root volume size string "0" no
security_group_id The id of the security group to run in string n/a yes
ssh_user Username for SSH string "ubuntu" no
stage The stage of the deployment string "" no
telemetry_url WSS URL for telemetry string "" no
use_external_lb Boolean to enable use of external load balancer bool false no
use_lb Boolean to enable the use of a load balancer bool false no
vpc_id The ID of the public VPC string n/a yes
zone The GCP zone to deploy in string "us-east1-b" no

Outputs

Name Description
cmd n/a
instance_group_id n/a
lb_endpoint n/a
target_pool_id n/a

Testing

This module has been packaged with terratest tests

To run them:

  1. Install Go
  2. Run make test-init from the root of this repo
  3. Run make test again from root

Authors

Module managed by Richard Mah

Credits

License

Apache 2 Licensed. See LICENSE for full details.