github.com/nevins-b/terraform@v0.3.8-0.20170215184714-bbae22007d5a/examples/alicloud-ecs-vpc-cluster/main.tf (about)

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