diff --git a/main.tf b/main.tf index e53d267..9121173 100644 --- a/main.tf +++ b/main.tf @@ -35,6 +35,7 @@ resource "alicloud_cen_instance_attachment" "vpc_attach_1" { instance_id = local.cen_id child_instance_id = var.vpc_id_1 child_instance_region_id = var.child_instance_region_id_1 + child_instance_type = var.child_instance_type } resource "alicloud_cen_instance_attachment" "vpc_attach_2" { @@ -42,6 +43,7 @@ resource "alicloud_cen_instance_attachment" "vpc_attach_2" { instance_id = local.cen_id child_instance_id = var.vpc_id_2 child_instance_region_id = var.child_instance_region_id_2 + child_instance_type = var.child_instance_type } resource "alicloud_cen_bandwidth_limit" "this" { @@ -55,4 +57,4 @@ resource "alicloud_cen_bandwidth_limit" "this" { "alicloud_cen_bandwidth_package_attachment.this", "alicloud_cen_instance_attachment.vpc_attach_1", "alicloud_cen_instance_attachment.vpc_attach_2"] -} \ No newline at end of file +} diff --git a/varibales.tf b/varibales.tf index 4ee1b92..244dc58 100644 --- a/varibales.tf +++ b/varibales.tf @@ -132,6 +132,12 @@ variable "child_instance_region_id_2" { default = "" } +variable "child_instance_type" { + description = "The type of the child instance to attach." + type = string + default = "VPC" +} + #bandwidth limit variable "create_bandwidth_limit" { description = "Wether to create bandwidth limit,Default to true." @@ -143,4 +149,4 @@ variable "bandwidth_limit" { description = " The bandwidth configured for the interconnected regions communication." type = number default = 4 -} \ No newline at end of file +}