alicloud_cloud_connect_network_attachment

Provides a Cloud Connect Network Attachment resource. This topic describes how to associate a Smart Access Gateway (SAG) instance with a network instance. You must associate an SAG instance with a network instance if you want to connect the SAG to Alibaba Cloud. You can connect an SAG to Alibaba Cloud through a leased line, the Internet, or the active and standby links.

For information about Cloud Connect Network Attachment and how to use it, see What is Cloud Connect Network Attachment.

Example Usage

Basic Usage

variable "name" {
  default = "tf-example"
}
variable "sag_id" {
  default = "sag-9bifkf***"
}
provider "alicloud" {
  region = "cn-shanghai"
}
resource "alicloud_cloud_connect_network" "default" {
  name        = var.name
  description = var.name
  cidr_block  = "192.168.0.0/24"
  is_default  = true
}

resource "alicloud_cloud_connect_network_attachment" "default" {
  ccn_id = alicloud_cloud_connect_network.default.id
  sag_id = var.sag_id
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:

Import

The Cloud Connect Network Attachment can be imported using the instance_id, e.g.

$ terraform import alicloud_cloud_connect_network_attachment.example ccn-abc123456:sag-abc123456