Network Attachment Args
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.
NOTE: Available since v1.64.0. NOTE: Only the following regions support. `cn-shanghai`, `cn-shanghai-finance-1`, `cn-hongkong`, `ap-southeast-1`, `ap-southeast-2`, `ap-southeast-3`, `ap-southeast-5`, `ap-northeast-1`, `eu-central-1`
Example Usage
Basic Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cloudconnect.Network;
import com.pulumi.alicloud.cloudconnect.NetworkArgs;
import com.pulumi.alicloud.cloudconnect.NetworkAttachment;
import com.pulumi.alicloud.cloudconnect.NetworkAttachmentArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var name = config.get("name").orElse("tf-example");
final var sagId = config.get("sagId").orElse("sag-9bifkf***");
var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
.description(name)
.cidrBlock("192.168.0.0/24")
.isDefault(true)
.build());
var defaultNetworkAttachment = new NetworkAttachment("defaultNetworkAttachment", NetworkAttachmentArgs.builder()
.ccnId(defaultNetwork.id())
.sagId(sagId)
.build());
}
}
Import
The Cloud Connect Network Attachment can be imported using the instance_id, e.g.
$ pulumi import alicloud:cloudconnect/networkAttachment:NetworkAttachment example ccn-abc123456:sag-abc123456