Skip to content

ASaiun/terraform-alicloud-slb

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alicloud Load Balancer (SLB) Terraform Module

Terraform module which creates SLB resources on Alibaba Cloud.

These types of resources are supported:

Root module calls these modules which can also be used separately to create independent resources:

NOTE:

  • If vswitch_id is set, the internal only is true
  • If slb instance network is internal, the internet_charge_type only is "PayByTraffic".

Usage

You can use this in your terraform template with the following steps.

  1. Adding a module resource to your template, e.g. main.tf

      module "tf-slb" {
         source = "alibaba/slb/alicloud"
    
         vswitch_id = "${var.vswitch_id}"
    
         name = "tf-module-slb"
         vswitch_id = "vsw-3fin3c4"
         internal = true
         bandwidth = 5
         spec = "slb.s1.small"
    
         instances = ["i-fqefvdfbec9d", "i-fn39g3v93h89br"]
    
      }
    
  2. Setting values for the following variables through environment variables:

    • ALICLOUD_ACCESS_KEY
    • ALICLOUD_SECRET_KEY

Authors

Created and maintained by He Guimin(@xiaozhu36 heguimin36@163.com)

Reference

About

Terraform module which creates Load balancer and attach ECS instances in it on Alibaba Cloud.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • HCL 100.0%