NetworkGrant

Provides a Cloud Connect Network Grant resource. If the CEN instance to be attached belongs to another account, authorization by the CEN instance is required. For information about Cloud Connect Network Grant and how to use it, see What is Cloud Connect Network Grant.

NOTE: Available in 1.63.0+ NOTE: Only the following regions support create Cloud Connect Network Grant. `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.Provider;
import com.pulumi.alicloud.ProviderArgs;
import com.pulumi.alicloud.cen.Instance;
import com.pulumi.alicloud.cen.InstanceArgs;
import com.pulumi.alicloud.cloudconnect.Network;
import com.pulumi.alicloud.cloudconnect.NetworkArgs;
import com.pulumi.alicloud.cloudconnect.NetworkGrant;
import com.pulumi.alicloud.cloudconnect.NetworkGrantArgs;
import com.pulumi.resources.CustomResourceOptions;
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) {
var ccnAccount = new Provider("ccnAccount");
var cenAccount = new Provider("cenAccount", ProviderArgs.builder()
.region("cn-hangzhou")
.accessKey("xxxxxx")
.secretKey("xxxxxx")
.build());
var cen = new Instance("cen", InstanceArgs.Empty, CustomResourceOptions.builder()
.provider(alicloud.cen_account())
.build());
var ccn = new Network("ccn", NetworkArgs.builder()
.isDefault("true")
.build(), CustomResourceOptions.builder()
.provider(alicloud.ccn_account())
.build());
var default_ = new NetworkGrant("default", NetworkGrantArgs.builder()
.ccnId(ccn.id())
.cenId(cen.id())
.cenUid("xxxxxx")
.build(), CustomResourceOptions.builder()
.dependsOn(
ccn,
cen)
.build());
}
}

Import

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

$ pulumi import alicloud:cloudconnect/networkGrant:NetworkGrant example ccn-abc123456:cen-abc123456

Properties

Link copied to clipboard
val ccnId: Output<String>

The ID of the CCN instance.

Link copied to clipboard
val cenId: Output<String>

The ID of the CEN instance.

Link copied to clipboard
val cenUid: Output<String>

The ID of the account to which the CEN instance belongs.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val urn: Output<String>