提交 287820de 编写于 作者: F freesky-edward

Add eips support

上级 5f5c0d9c
resource "huaweicloud_vpc_eip_v1" "this" {
count = "${length(var.eips)}"
publicip {
type = "5_bgp"
}
bandwidth {
name = "${lookup(var.eips[count.index], "bandwidth-name", null)}"
size = "${lookup(var.eips[count.index], "size", null)}"
share_type = "PER"
charge_mode = "traffic"
}
}
variable "eips" {
type = list(map(string))
description = "List of eips"
default = []
}
output "this_eip_ids" {
description = "List of IDs of the eips"
value = "${join(",",huaweicloud_vpc_eip_v1.this.*.id)}"
}
output "this_eip_addresses" {
description = "List of address of the eips"
value = "${join(",",huaweicloud_vpc_eip_v1.this.*.publicip.ip_address)}"
}
......@@ -74,4 +74,25 @@ module "cce" {
]
}
module "internet" {
source = "./internet"
eips = [
{
bandwidth-name = "bandwidth-01",
size = "5"
},
{
bandwidth-name = "bandwidth-02",
size = "5"
},
{
bandwidth-name = "bandwidth-03",
size = "5"
},
{
bandwidth-name = "bandwidth-04",
size = "5"
}
]
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册