github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/examples/alicloud-ecs-vpc-cluster/main.tf (about)

     1  
     2  module "vpc" {
     3    availability_zones = "${var.availability_zones}"
     4    source = "../alicloud-vpc"
     5    short_name = "${var.short_name}"
     6    region = "${var.region}"
     7  }
     8  
     9  module "security-groups" {
    10    source = "../alicloud-vpc-cluster-sg"
    11    short_name = "${var.short_name}"
    12    vpc_id = "${module.vpc.vpc_id}"
    13  }
    14  
    15  module "control-nodes" {
    16    source = "../alicloud-ecs-vpc"
    17    count = "${var.control_count}"
    18    role = "control"
    19    datacenter = "${var.datacenter}"
    20    ecs_type = "${var.control_ecs_type}"
    21    disk_size = "${var.control_disk_size}"
    22    ssh_username = "${var.ssh_username}"
    23    short_name = "${var.short_name}"
    24    availability_zones = "${module.vpc.availability_zones}"
    25    security_groups = ["${module.security-groups.control_security_group}"]
    26    vswitch_id = "${module.vpc.vswitch_ids}"
    27  }
    28  
    29  module "edge-nodes" {
    30    source = "../alicloud-ecs-vpc"
    31    count = "${var.edge_count}"
    32    role = "edge"
    33    datacenter = "${var.datacenter}"
    34    ecs_type = "${var.edge_ecs_type}"
    35    ssh_username = "${var.ssh_username}"
    36    short_name = "${var.short_name}"
    37    availability_zones = "${module.vpc.availability_zones}"
    38    security_groups = ["${module.security-groups.worker_security_group}"]
    39    vswitch_id = "${module.vpc.vswitch_ids}"
    40  }
    41  
    42  module "worker-nodes" {
    43    source = "../alicloud-ecs-vpc"
    44    count = "${var.worker_count}"
    45    role = "worker"
    46    datacenter = "${var.datacenter}"
    47    ecs_type = "${var.worker_ecs_type}"
    48    ssh_username = "${var.ssh_username}"
    49    short_name = "${var.short_name}"
    50    availability_zones = "${module.vpc.availability_zones}"
    51    security_groups = ["${module.security-groups.worker_security_group}"]
    52    vswitch_id = "${module.vpc.vswitch_ids}"
    53  }