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

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var ccnAccount = new AliCloud.Provider("ccnAccount", new AliCloud.ProviderArgs
        {
        });
        var cenAccount = new AliCloud.Provider("cenAccount", new AliCloud.ProviderArgs
        {
            AccessKey = "xxxxxx",
            Region = "cn-hangzhou",
            SecretKey = "xxxxxx",
        });
        var cen = new AliCloud.Cen.Instance("cen", new AliCloud.Cen.InstanceArgs
        {
        });
        var ccn = new AliCloud.CloudConnect.Network("ccn", new AliCloud.CloudConnect.NetworkArgs
        {
            IsDefault = true,
        });
        var @default = new AliCloud.CloudConnect.NetworkGrant("default", new AliCloud.CloudConnect.NetworkGrantArgs
        {
            CcnId = ccn.Id,
            CenId = cen.Id,
            CenUid = "xxxxxx",
        });
    }

}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud
import pulumi_pulumi as pulumi

ccn_account = pulumi.providers.Alicloud("ccnAccount")
cen_account = pulumi.providers.Alicloud("cenAccount",
    access_key="xxxxxx",
    region="cn-hangzhou",
    secret_key="xxxxxx")
cen = alicloud.cen.Instance("cen")
ccn = alicloud.cloudconnect.Network("ccn", is_default="true")
default = alicloud.cloudconnect.NetworkGrant("default",
    ccn_id=ccn.id,
    cen_id=cen.id,
    cen_uid="xxxxxx")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const ccnAccount = new alicloud.Provider("ccn_account", {});
const cenAccount = new alicloud.Provider("cen_account", {
    accessKey: "xxxxxx",
    region: "cn-hangzhou",
    secretKey: "xxxxxx",
});
const cen = new alicloud.cen.Instance("cen", {}, { provider: cenAccount });
const ccn = new alicloud.cloudconnect.Network("ccn", {
    isDefault: true,
}, { provider: ccnAccount });
const defaultNetworkGrant = new alicloud.cloudconnect.NetworkGrant("default", {
    ccnId: ccn.id,
    cenId: cen.id,
    cenUid: "xxxxxx",
}, { dependsOn: [cen, ccn] });

Create a NetworkGrant Resource

def NetworkGrant(resource_name, opts=None, ccn_id=None, cen_id=None, cen_uid=None, __props__=None);
func NewNetworkGrant(ctx *Context, name string, args NetworkGrantArgs, opts ...ResourceOption) (*NetworkGrant, error)
name string
The unique name of the resource.
args NetworkGrantArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args NetworkGrantArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args NetworkGrantArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

NetworkGrant Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The NetworkGrant resource accepts the following input properties:

CcnId string

The ID of the CCN instance.

CenId string

The ID of the CEN instance.

CenUid string

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

CcnId string

The ID of the CCN instance.

CenId string

The ID of the CEN instance.

CenUid string

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

ccnId string

The ID of the CCN instance.

cenId string

The ID of the CEN instance.

cenUid string

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

ccn_id str

The ID of the CCN instance.

cen_id str

The ID of the CEN instance.

cen_uid str

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

Outputs

All input properties are implicitly available as output properties. Additionally, the NetworkGrant resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing NetworkGrant Resource

Get an existing NetworkGrant resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: NetworkGrantState, opts?: CustomResourceOptions): NetworkGrant
static get(resource_name, id, opts=None, ccn_id=None, cen_id=None, cen_uid=None, __props__=None);
func GetNetworkGrant(ctx *Context, name string, id IDInput, state *NetworkGrantState, opts ...ResourceOption) (*NetworkGrant, error)
public static NetworkGrant Get(string name, Input<string> id, NetworkGrantState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

CcnId string

The ID of the CCN instance.

CenId string

The ID of the CEN instance.

CenUid string

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

CcnId string

The ID of the CCN instance.

CenId string

The ID of the CEN instance.

CenUid string

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

ccnId string

The ID of the CCN instance.

cenId string

The ID of the CEN instance.

cenUid string

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

ccn_id str

The ID of the CCN instance.

cen_id str

The ID of the CEN instance.

cen_uid str

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

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.