1. Packages
  2. Nsxt Provider
  3. API Docs
  4. Vpc
nsxt 3.9.0 published on Friday, Jun 20, 2025 by vmware

nsxt.Vpc

Explore with Pulumi AI

nsxt logo
nsxt 3.9.0 published on Friday, Jun 20, 2025 by vmware

    Create Vpc Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Vpc(name: string, args: VpcArgs, opts?: CustomResourceOptions);
    @overload
    def Vpc(resource_name: str,
            args: VpcArgs,
            opts: Optional[ResourceOptions] = None)
    
    @overload
    def Vpc(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            context: Optional[VpcContextArgs] = None,
            display_name: Optional[str] = None,
            description: Optional[str] = None,
            ip_address_type: Optional[str] = None,
            load_balancer_vpc_endpoint: Optional[VpcLoadBalancerVpcEndpointArgs] = None,
            nsx_id: Optional[str] = None,
            private_ips: Optional[Sequence[str]] = None,
            short_id: Optional[str] = None,
            tags: Optional[Sequence[VpcTagArgs]] = None,
            vpc_id: Optional[str] = None,
            vpc_service_profile: Optional[str] = None)
    func NewVpc(ctx *Context, name string, args VpcArgs, opts ...ResourceOption) (*Vpc, error)
    public Vpc(string name, VpcArgs args, CustomResourceOptions? opts = null)
    public Vpc(String name, VpcArgs args)
    public Vpc(String name, VpcArgs args, CustomResourceOptions options)
    
    type: nsxt:Vpc
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args VpcArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args VpcArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args VpcArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VpcArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VpcArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var vpcResource = new Nsxt.Vpc("vpcResource", new()
    {
        Context = new Nsxt.Inputs.VpcContextArgs
        {
            ProjectId = "string",
        },
        DisplayName = "string",
        Description = "string",
        IpAddressType = "string",
        LoadBalancerVpcEndpoint = new Nsxt.Inputs.VpcLoadBalancerVpcEndpointArgs
        {
            Enabled = false,
        },
        NsxId = "string",
        PrivateIps = new[]
        {
            "string",
        },
        ShortId = "string",
        Tags = new[]
        {
            new Nsxt.Inputs.VpcTagArgs
            {
                Scope = "string",
                Tag = "string",
            },
        },
        VpcId = "string",
        VpcServiceProfile = "string",
    });
    
    example, err := nsxt.NewVpc(ctx, "vpcResource", &nsxt.VpcArgs{
    	Context: &nsxt.VpcContextArgs{
    		ProjectId: pulumi.String("string"),
    	},
    	DisplayName:   pulumi.String("string"),
    	Description:   pulumi.String("string"),
    	IpAddressType: pulumi.String("string"),
    	LoadBalancerVpcEndpoint: &nsxt.VpcLoadBalancerVpcEndpointArgs{
    		Enabled: pulumi.Bool(false),
    	},
    	NsxId: pulumi.String("string"),
    	PrivateIps: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ShortId: pulumi.String("string"),
    	Tags: nsxt.VpcTagArray{
    		&nsxt.VpcTagArgs{
    			Scope: pulumi.String("string"),
    			Tag:   pulumi.String("string"),
    		},
    	},
    	VpcId:             pulumi.String("string"),
    	VpcServiceProfile: pulumi.String("string"),
    })
    
    var vpcResource = new Vpc("vpcResource", VpcArgs.builder()
        .context(VpcContextArgs.builder()
            .projectId("string")
            .build())
        .displayName("string")
        .description("string")
        .ipAddressType("string")
        .loadBalancerVpcEndpoint(VpcLoadBalancerVpcEndpointArgs.builder()
            .enabled(false)
            .build())
        .nsxId("string")
        .privateIps("string")
        .shortId("string")
        .tags(VpcTagArgs.builder()
            .scope("string")
            .tag("string")
            .build())
        .vpcId("string")
        .vpcServiceProfile("string")
        .build());
    
    vpc_resource = nsxt.Vpc("vpcResource",
        context={
            "project_id": "string",
        },
        display_name="string",
        description="string",
        ip_address_type="string",
        load_balancer_vpc_endpoint={
            "enabled": False,
        },
        nsx_id="string",
        private_ips=["string"],
        short_id="string",
        tags=[{
            "scope": "string",
            "tag": "string",
        }],
        vpc_id="string",
        vpc_service_profile="string")
    
    const vpcResource = new nsxt.Vpc("vpcResource", {
        context: {
            projectId: "string",
        },
        displayName: "string",
        description: "string",
        ipAddressType: "string",
        loadBalancerVpcEndpoint: {
            enabled: false,
        },
        nsxId: "string",
        privateIps: ["string"],
        shortId: "string",
        tags: [{
            scope: "string",
            tag: "string",
        }],
        vpcId: "string",
        vpcServiceProfile: "string",
    });
    
    type: nsxt:Vpc
    properties:
        context:
            projectId: string
        description: string
        displayName: string
        ipAddressType: string
        loadBalancerVpcEndpoint:
            enabled: false
        nsxId: string
        privateIps:
            - string
        shortId: string
        tags:
            - scope: string
              tag: string
        vpcId: string
        vpcServiceProfile: string
    

    Vpc Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Vpc resource accepts the following input properties:

    Context VpcContext
    Resource context
    DisplayName string
    Display name of the resource.
    Description string
    Description of the resource.
    IpAddressType string
    This defines the IP address type that will be allocated for subnets.
    LoadBalancerVpcEndpoint VpcLoadBalancerVpcEndpoint
    Configuration for Load Balancer Endpoint
    NsxId string
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    PrivateIps List<string>
    IP CIDRs to manage private IPv4 subnets.
    ShortId string
    Defaults to id if id is less than equal to 8 characters or defaults to random generated id if not set. Can not be updated once VPC is created.
    Tags List<VpcTag>
    A list of scope + tag pairs to associate with this resource.
    VpcId string
    ID of the resource.
    VpcServiceProfile string
    The path of the configuration profile of the VPC services.
    Context VpcContextArgs
    Resource context
    DisplayName string
    Display name of the resource.
    Description string
    Description of the resource.
    IpAddressType string
    This defines the IP address type that will be allocated for subnets.
    LoadBalancerVpcEndpoint VpcLoadBalancerVpcEndpointArgs
    Configuration for Load Balancer Endpoint
    NsxId string
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    PrivateIps []string
    IP CIDRs to manage private IPv4 subnets.
    ShortId string
    Defaults to id if id is less than equal to 8 characters or defaults to random generated id if not set. Can not be updated once VPC is created.
    Tags []VpcTagArgs
    A list of scope + tag pairs to associate with this resource.
    VpcId string
    ID of the resource.
    VpcServiceProfile string
    The path of the configuration profile of the VPC services.
    context VpcContext
    Resource context
    displayName String
    Display name of the resource.
    description String
    Description of the resource.
    ipAddressType String
    This defines the IP address type that will be allocated for subnets.
    loadBalancerVpcEndpoint VpcLoadBalancerVpcEndpoint
    Configuration for Load Balancer Endpoint
    nsxId String
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    privateIps List<String>
    IP CIDRs to manage private IPv4 subnets.
    shortId String
    Defaults to id if id is less than equal to 8 characters or defaults to random generated id if not set. Can not be updated once VPC is created.
    tags List<VpcTag>
    A list of scope + tag pairs to associate with this resource.
    vpcId String
    ID of the resource.
    vpcServiceProfile String
    The path of the configuration profile of the VPC services.
    context VpcContext
    Resource context
    displayName string
    Display name of the resource.
    description string
    Description of the resource.
    ipAddressType string
    This defines the IP address type that will be allocated for subnets.
    loadBalancerVpcEndpoint VpcLoadBalancerVpcEndpoint
    Configuration for Load Balancer Endpoint
    nsxId string
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    privateIps string[]
    IP CIDRs to manage private IPv4 subnets.
    shortId string
    Defaults to id if id is less than equal to 8 characters or defaults to random generated id if not set. Can not be updated once VPC is created.
    tags VpcTag[]
    A list of scope + tag pairs to associate with this resource.
    vpcId string
    ID of the resource.
    vpcServiceProfile string
    The path of the configuration profile of the VPC services.
    context VpcContextArgs
    Resource context
    display_name str
    Display name of the resource.
    description str
    Description of the resource.
    ip_address_type str
    This defines the IP address type that will be allocated for subnets.
    load_balancer_vpc_endpoint VpcLoadBalancerVpcEndpointArgs
    Configuration for Load Balancer Endpoint
    nsx_id str
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    private_ips Sequence[str]
    IP CIDRs to manage private IPv4 subnets.
    short_id str
    Defaults to id if id is less than equal to 8 characters or defaults to random generated id if not set. Can not be updated once VPC is created.
    tags Sequence[VpcTagArgs]
    A list of scope + tag pairs to associate with this resource.
    vpc_id str
    ID of the resource.
    vpc_service_profile str
    The path of the configuration profile of the VPC services.
    context Property Map
    Resource context
    displayName String
    Display name of the resource.
    description String
    Description of the resource.
    ipAddressType String
    This defines the IP address type that will be allocated for subnets.
    loadBalancerVpcEndpoint Property Map
    Configuration for Load Balancer Endpoint
    nsxId String
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    privateIps List<String>
    IP CIDRs to manage private IPv4 subnets.
    shortId String
    Defaults to id if id is less than equal to 8 characters or defaults to random generated id if not set. Can not be updated once VPC is created.
    tags List<Property Map>
    A list of scope + tag pairs to associate with this resource.
    vpcId String
    ID of the resource.
    vpcServiceProfile String
    The path of the configuration profile of the VPC services.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Path string
    The NSX path of the policy resource.
    Revision double
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
    Id string
    The provider-assigned unique ID for this managed resource.
    Path string
    The NSX path of the policy resource.
    Revision float64
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
    id String
    The provider-assigned unique ID for this managed resource.
    path String
    The NSX path of the policy resource.
    revision Double
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
    id string
    The provider-assigned unique ID for this managed resource.
    path string
    The NSX path of the policy resource.
    revision number
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
    id str
    The provider-assigned unique ID for this managed resource.
    path str
    The NSX path of the policy resource.
    revision float
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
    id String
    The provider-assigned unique ID for this managed resource.
    path String
    The NSX path of the policy resource.
    revision Number
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.

    Look up Existing Vpc Resource

    Get an existing Vpc 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?: VpcState, opts?: CustomResourceOptions): Vpc
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            context: Optional[VpcContextArgs] = None,
            description: Optional[str] = None,
            display_name: Optional[str] = None,
            ip_address_type: Optional[str] = None,
            load_balancer_vpc_endpoint: Optional[VpcLoadBalancerVpcEndpointArgs] = None,
            nsx_id: Optional[str] = None,
            path: Optional[str] = None,
            private_ips: Optional[Sequence[str]] = None,
            revision: Optional[float] = None,
            short_id: Optional[str] = None,
            tags: Optional[Sequence[VpcTagArgs]] = None,
            vpc_id: Optional[str] = None,
            vpc_service_profile: Optional[str] = None) -> Vpc
    func GetVpc(ctx *Context, name string, id IDInput, state *VpcState, opts ...ResourceOption) (*Vpc, error)
    public static Vpc Get(string name, Input<string> id, VpcState? state, CustomResourceOptions? opts = null)
    public static Vpc get(String name, Output<String> id, VpcState state, CustomResourceOptions options)
    resources:  _:    type: nsxt:Vpc    get:      id: ${id}
    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.
    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:
    Context VpcContext
    Resource context
    Description string
    Description of the resource.
    DisplayName string
    Display name of the resource.
    IpAddressType string
    This defines the IP address type that will be allocated for subnets.
    LoadBalancerVpcEndpoint VpcLoadBalancerVpcEndpoint
    Configuration for Load Balancer Endpoint
    NsxId string
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    Path string
    The NSX path of the policy resource.
    PrivateIps List<string>
    IP CIDRs to manage private IPv4 subnets.
    Revision double
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
    ShortId string
    Defaults to id if id is less than equal to 8 characters or defaults to random generated id if not set. Can not be updated once VPC is created.
    Tags List<VpcTag>
    A list of scope + tag pairs to associate with this resource.
    VpcId string
    ID of the resource.
    VpcServiceProfile string
    The path of the configuration profile of the VPC services.
    Context VpcContextArgs
    Resource context
    Description string
    Description of the resource.
    DisplayName string
    Display name of the resource.
    IpAddressType string
    This defines the IP address type that will be allocated for subnets.
    LoadBalancerVpcEndpoint VpcLoadBalancerVpcEndpointArgs
    Configuration for Load Balancer Endpoint
    NsxId string
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    Path string
    The NSX path of the policy resource.
    PrivateIps []string
    IP CIDRs to manage private IPv4 subnets.
    Revision float64
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
    ShortId string
    Defaults to id if id is less than equal to 8 characters or defaults to random generated id if not set. Can not be updated once VPC is created.
    Tags []VpcTagArgs
    A list of scope + tag pairs to associate with this resource.
    VpcId string
    ID of the resource.
    VpcServiceProfile string
    The path of the configuration profile of the VPC services.
    context VpcContext
    Resource context
    description String
    Description of the resource.
    displayName String
    Display name of the resource.
    ipAddressType String
    This defines the IP address type that will be allocated for subnets.
    loadBalancerVpcEndpoint VpcLoadBalancerVpcEndpoint
    Configuration for Load Balancer Endpoint
    nsxId String
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    path String
    The NSX path of the policy resource.
    privateIps List<String>
    IP CIDRs to manage private IPv4 subnets.
    revision Double
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
    shortId String
    Defaults to id if id is less than equal to 8 characters or defaults to random generated id if not set. Can not be updated once VPC is created.
    tags List<VpcTag>
    A list of scope + tag pairs to associate with this resource.
    vpcId String
    ID of the resource.
    vpcServiceProfile String
    The path of the configuration profile of the VPC services.
    context VpcContext
    Resource context
    description string
    Description of the resource.
    displayName string
    Display name of the resource.
    ipAddressType string
    This defines the IP address type that will be allocated for subnets.
    loadBalancerVpcEndpoint VpcLoadBalancerVpcEndpoint
    Configuration for Load Balancer Endpoint
    nsxId string
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    path string
    The NSX path of the policy resource.
    privateIps string[]
    IP CIDRs to manage private IPv4 subnets.
    revision number
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
    shortId string
    Defaults to id if id is less than equal to 8 characters or defaults to random generated id if not set. Can not be updated once VPC is created.
    tags VpcTag[]
    A list of scope + tag pairs to associate with this resource.
    vpcId string
    ID of the resource.
    vpcServiceProfile string
    The path of the configuration profile of the VPC services.
    context VpcContextArgs
    Resource context
    description str
    Description of the resource.
    display_name str
    Display name of the resource.
    ip_address_type str
    This defines the IP address type that will be allocated for subnets.
    load_balancer_vpc_endpoint VpcLoadBalancerVpcEndpointArgs
    Configuration for Load Balancer Endpoint
    nsx_id str
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    path str
    The NSX path of the policy resource.
    private_ips Sequence[str]
    IP CIDRs to manage private IPv4 subnets.
    revision float
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
    short_id str
    Defaults to id if id is less than equal to 8 characters or defaults to random generated id if not set. Can not be updated once VPC is created.
    tags Sequence[VpcTagArgs]
    A list of scope + tag pairs to associate with this resource.
    vpc_id str
    ID of the resource.
    vpc_service_profile str
    The path of the configuration profile of the VPC services.
    context Property Map
    Resource context
    description String
    Description of the resource.
    displayName String
    Display name of the resource.
    ipAddressType String
    This defines the IP address type that will be allocated for subnets.
    loadBalancerVpcEndpoint Property Map
    Configuration for Load Balancer Endpoint
    nsxId String
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    path String
    The NSX path of the policy resource.
    privateIps List<String>
    IP CIDRs to manage private IPv4 subnets.
    revision Number
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
    shortId String
    Defaults to id if id is less than equal to 8 characters or defaults to random generated id if not set. Can not be updated once VPC is created.
    tags List<Property Map>
    A list of scope + tag pairs to associate with this resource.
    vpcId String
    ID of the resource.
    vpcServiceProfile String
    The path of the configuration profile of the VPC services.

    Supporting Types

    VpcContext, VpcContextArgs

    ProjectId string
    Id of the project which the resource belongs to.
    ProjectId string
    Id of the project which the resource belongs to.
    projectId String
    Id of the project which the resource belongs to.
    projectId string
    Id of the project which the resource belongs to.
    project_id str
    Id of the project which the resource belongs to.
    projectId String
    Id of the project which the resource belongs to.

    VpcLoadBalancerVpcEndpoint, VpcLoadBalancerVpcEndpointArgs

    Enabled bool
    Flag to indicate whether support for load balancing is needed. Setting this flag to true causes allocation of private IPs from the private block associated with this VPC for the use of the load balancer.
    Enabled bool
    Flag to indicate whether support for load balancing is needed. Setting this flag to true causes allocation of private IPs from the private block associated with this VPC for the use of the load balancer.
    enabled Boolean
    Flag to indicate whether support for load balancing is needed. Setting this flag to true causes allocation of private IPs from the private block associated with this VPC for the use of the load balancer.
    enabled boolean
    Flag to indicate whether support for load balancing is needed. Setting this flag to true causes allocation of private IPs from the private block associated with this VPC for the use of the load balancer.
    enabled bool
    Flag to indicate whether support for load balancing is needed. Setting this flag to true causes allocation of private IPs from the private block associated with this VPC for the use of the load balancer.
    enabled Boolean
    Flag to indicate whether support for load balancing is needed. Setting this flag to true causes allocation of private IPs from the private block associated with this VPC for the use of the load balancer.

    VpcTag, VpcTagArgs

    Scope string
    Tag string
    A list of scope + tag pairs to associate with this resource.
    Scope string
    Tag string
    A list of scope + tag pairs to associate with this resource.
    scope String
    tag String
    A list of scope + tag pairs to associate with this resource.
    scope string
    tag string
    A list of scope + tag pairs to associate with this resource.
    scope str
    tag str
    A list of scope + tag pairs to associate with this resource.
    scope String
    tag String
    A list of scope + tag pairs to associate with this resource.

    Package Details

    Repository
    nsxt vmware/terraform-provider-nsxt
    License
    Notes
    This Pulumi package is based on the nsxt Terraform Provider.
    nsxt logo
    nsxt 3.9.0 published on Friday, Jun 20, 2025 by vmware