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:
- slb - creates SLB
- slb_attachment - creates SLB attachment
NOTE
:
- If
vswitch_id
is set, theinternal
only is true - If slb instance network is internal, the
internet_charge_type
only is "PayByTraffic".
You can use this in your terraform template with the following steps.
-
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"] }
-
Setting values for the following variables through environment variables:
- ALICLOUD_ACCESS_KEY
- ALICLOUD_SECRET_KEY
Created and maintained by He Guimin(@xiaozhu36 heguimin36@163.com)