published on Wednesday, Sep 2, 2026 by Pulumi
published on Wednesday, Sep 2, 2026 by Pulumi
The vsphere.NetworkProtocolProfile resource can be used to
create and manage network protocol profiles, also known as IP pools. A
network protocol profile defines a range of IP addresses, along with DNS,
gateway, and proxy settings, that can be associated with one or more
networks (standard port groups, distributed port groups, or opaque
networks) within a datacenter. vCenter Server uses this configuration to
automatically assign network settings to virtual machines during
provisioning and customization.
NOTE: This resource requires vCenter and is not available on direct ESX connections.
NOTE: vCenter allows a network to be associated with only one network protocol profile at a time. If a network in
networkIdsis already associated with a different network protocol profile, vCenter will silently move it away from that profile rather than rejecting the request. To prevent this, the provider validates that none of the configurednetworkIdsare already assigned to another network protocol profile, and will raise an error (both at plan time and apply time) if a conflict is found.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vsphere from "@pulumi/vsphere";
const datacenter = vsphere.getDatacenter({
name: "dc-01",
});
const network = datacenter.then(datacenter => vsphere.getNetwork({
name: "VM Network",
datacenterId: datacenter.id,
}));
const profile = new vsphere.NetworkProtocolProfile("profile", {
name: "example-profile",
datacenterId: datacenter.then(datacenter => datacenter.id),
networkIds: [network.then(network => network.id)],
dnsDomain: "example.com",
dnsSearchPath: "example.com",
ipv4: {
subnet: "10.10.10.0",
netmask: "255.255.255.0",
gateway: "10.10.10.1",
range: "10.10.10.100#100",
dnsServers: [
"10.10.10.10",
"10.10.10.11",
],
},
});
import pulumi
import pulumi_vsphere as vsphere
datacenter = vsphere.get_datacenter(name="dc-01")
network = vsphere.get_network(name="VM Network",
datacenter_id=datacenter.id)
profile = vsphere.NetworkProtocolProfile("profile",
name="example-profile",
datacenter_id=datacenter.id,
network_ids=[network.id],
dns_domain="example.com",
dns_search_path="example.com",
ipv4={
"subnet": "10.10.10.0",
"netmask": "255.255.255.0",
"gateway": "10.10.10.1",
"range": "10.10.10.100#100",
"dns_servers": [
"10.10.10.10",
"10.10.10.11",
],
})
package main
import (
"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
datacenter, err := vsphere.GetDatacenter(ctx, &vsphere.LookupDatacenterArgs{
Name: pulumi.StringRef("dc-01"),
}, nil)
if err != nil {
return err
}
network, err := vsphere.GetNetwork(ctx, &vsphere.GetNetworkArgs{
Name: "VM Network",
DatacenterId: pulumi.StringRef(datacenter.Id),
}, nil)
if err != nil {
return err
}
_, err = vsphere.NewNetworkProtocolProfile(ctx, "profile", &vsphere.NetworkProtocolProfileArgs{
Name: pulumi.String("example-profile"),
DatacenterId: pulumi.String(datacenter.Id),
NetworkIds: pulumi.StringArray{
pulumi.String(network.Id),
},
DnsDomain: pulumi.String("example.com"),
DnsSearchPath: pulumi.String("example.com"),
Ipv4: &vsphere.NetworkProtocolProfileIpv4Args{
Subnet: pulumi.String("10.10.10.0"),
Netmask: pulumi.String("255.255.255.0"),
Gateway: pulumi.String("10.10.10.1"),
Range: pulumi.String("10.10.10.100#100"),
DnsServers: pulumi.StringArray{
pulumi.String("10.10.10.10"),
pulumi.String("10.10.10.11"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using VSphere = Pulumi.VSphere;
return await Deployment.RunAsync(() =>
{
var datacenter = VSphere.GetDatacenter.Invoke(new()
{
Name = "dc-01",
});
var network = VSphere.GetNetwork.Invoke(new()
{
Name = "VM Network",
DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
});
var profile = new VSphere.NetworkProtocolProfile("profile", new()
{
Name = "example-profile",
DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
NetworkIds = new[]
{
network.Apply(getNetworkResult => getNetworkResult.Id),
},
DnsDomain = "example.com",
DnsSearchPath = "example.com",
Ipv4 = new VSphere.Inputs.NetworkProtocolProfileIpv4Args
{
Subnet = "10.10.10.0",
Netmask = "255.255.255.0",
Gateway = "10.10.10.1",
Range = "10.10.10.100#100",
DnsServers = new[]
{
"10.10.10.10",
"10.10.10.11",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vsphere.VsphereFunctions;
import com.pulumi.vsphere.inputs.GetDatacenterArgs;
import com.pulumi.vsphere.inputs.GetNetworkArgs;
import com.pulumi.vsphere.NetworkProtocolProfile;
import com.pulumi.vsphere.NetworkProtocolProfileArgs;
import com.pulumi.vsphere.inputs.NetworkProtocolProfileIpv4Args;
import java.util.ArrayList;
import java.util.Arrays;
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 datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()
.name("dc-01")
.build());
final var network = VsphereFunctions.getNetwork(GetNetworkArgs.builder()
.name("VM Network")
.datacenterId(datacenter.id())
.build());
var profile = new NetworkProtocolProfile("profile", NetworkProtocolProfileArgs.builder()
.name("example-profile")
.datacenterId(datacenter.id())
.networkIds(network.id())
.dnsDomain("example.com")
.dnsSearchPath("example.com")
.ipv4(NetworkProtocolProfileIpv4Args.builder()
.subnet("10.10.10.0")
.netmask("255.255.255.0")
.gateway("10.10.10.1")
.range("10.10.10.100#100")
.dnsServers(
"10.10.10.10",
"10.10.10.11")
.build())
.build());
}
}
resources:
profile:
type: vsphere:NetworkProtocolProfile
properties:
name: example-profile
datacenterId: ${datacenter.id}
networkIds:
- ${network.id}
dnsDomain: example.com
dnsSearchPath: example.com
ipv4:
subnet: 10.10.10.0
netmask: 255.255.255.0
gateway: 10.10.10.1
range: 10.10.10.100#100
dnsServers:
- 10.10.10.10
- 10.10.10.11
variables:
datacenter:
fn::invoke:
function: vsphere:getDatacenter
arguments:
name: dc-01
network:
fn::invoke:
function: vsphere:getNetwork
arguments:
name: VM Network
datacenterId: ${datacenter.id}
pulumi {
required_providers {
vsphere = {
source = "pulumi/vsphere"
}
}
}
data "vsphere_getdatacenter" "datacenter" {
name = "dc-01"
}
data "vsphere_getnetwork" "network" {
name = "VM Network"
datacenter_id = data.vsphere_getdatacenter.datacenter.id
}
resource "vsphere_networkprotocolprofile" "profile" {
name = "example-profile"
datacenter_id = data.vsphere_getdatacenter.datacenter.id
network_ids = [data.vsphere_getnetwork.network.id]
dns_domain = "example.com"
dns_search_path = "example.com"
ipv4 = {
subnet = "10.10.10.0"
netmask = "255.255.255.0"
gateway = "10.10.10.1"
range = "10.10.10.100#100"
dns_servers = ["10.10.10.10", "10.10.10.11"]
}
}
Create NetworkProtocolProfile Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NetworkProtocolProfile(name: string, args: NetworkProtocolProfileArgs, opts?: CustomResourceOptions);@overload
def NetworkProtocolProfile(resource_name: str,
args: NetworkProtocolProfileArgs,
opts: Optional[ResourceOptions] = None)
@overload
def NetworkProtocolProfile(resource_name: str,
opts: Optional[ResourceOptions] = None,
datacenter_id: Optional[str] = None,
dns_domain: Optional[str] = None,
dns_search_path: Optional[str] = None,
host_prefix: Optional[str] = None,
http_proxy: Optional[str] = None,
ipv4: Optional[NetworkProtocolProfileIpv4Args] = None,
ipv6: Optional[NetworkProtocolProfileIpv6Args] = None,
name: Optional[str] = None,
network_ids: Optional[Sequence[str]] = None)func NewNetworkProtocolProfile(ctx *Context, name string, args NetworkProtocolProfileArgs, opts ...ResourceOption) (*NetworkProtocolProfile, error)public NetworkProtocolProfile(string name, NetworkProtocolProfileArgs args, CustomResourceOptions? opts = null)
public NetworkProtocolProfile(String name, NetworkProtocolProfileArgs args)
public NetworkProtocolProfile(String name, NetworkProtocolProfileArgs args, CustomResourceOptions options)
type: vsphere:NetworkProtocolProfile
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "vsphere_network_protocol_profile" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args NetworkProtocolProfileArgs
- 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 NetworkProtocolProfileArgs
- 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 NetworkProtocolProfileArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkProtocolProfileArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NetworkProtocolProfileArgs
- 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 networkProtocolProfileResource = new VSphere.NetworkProtocolProfile("networkProtocolProfileResource", new()
{
DatacenterId = "string",
DnsDomain = "string",
DnsSearchPath = "string",
HostPrefix = "string",
HttpProxy = "string",
Ipv4 = new VSphere.Inputs.NetworkProtocolProfileIpv4Args
{
Netmask = "string",
Range = "string",
Subnet = "string",
AllocatedAddresses = 0,
AvailableAddresses = 0,
DhcpAvailable = false,
DnsServers = new[]
{
"string",
},
Enabled = false,
Gateway = "string",
},
Ipv6 = new VSphere.Inputs.NetworkProtocolProfileIpv6Args
{
Netmask = "string",
Range = "string",
Subnet = "string",
AllocatedAddresses = 0,
AvailableAddresses = 0,
DhcpAvailable = false,
DnsServers = new[]
{
"string",
},
Enabled = false,
Gateway = "string",
},
Name = "string",
NetworkIds = new[]
{
"string",
},
});
example, err := vsphere.NewNetworkProtocolProfile(ctx, "networkProtocolProfileResource", &vsphere.NetworkProtocolProfileArgs{
DatacenterId: pulumi.String("string"),
DnsDomain: pulumi.String("string"),
DnsSearchPath: pulumi.String("string"),
HostPrefix: pulumi.String("string"),
HttpProxy: pulumi.String("string"),
Ipv4: &vsphere.NetworkProtocolProfileIpv4Args{
Netmask: pulumi.String("string"),
Range: pulumi.String("string"),
Subnet: pulumi.String("string"),
AllocatedAddresses: pulumi.Int(0),
AvailableAddresses: pulumi.Int(0),
DhcpAvailable: pulumi.Bool(false),
DnsServers: pulumi.StringArray{
pulumi.String("string"),
},
Enabled: pulumi.Bool(false),
Gateway: pulumi.String("string"),
},
Ipv6: &vsphere.NetworkProtocolProfileIpv6Args{
Netmask: pulumi.String("string"),
Range: pulumi.String("string"),
Subnet: pulumi.String("string"),
AllocatedAddresses: pulumi.Int(0),
AvailableAddresses: pulumi.Int(0),
DhcpAvailable: pulumi.Bool(false),
DnsServers: pulumi.StringArray{
pulumi.String("string"),
},
Enabled: pulumi.Bool(false),
Gateway: pulumi.String("string"),
},
Name: pulumi.String("string"),
NetworkIds: pulumi.StringArray{
pulumi.String("string"),
},
})
resource "vsphere_network_protocol_profile" "networkProtocolProfileResource" {
lifecycle {
create_before_destroy = true
}
datacenter_id = "string"
dns_domain = "string"
dns_search_path = "string"
host_prefix = "string"
http_proxy = "string"
ipv4 = {
netmask = "string"
range = "string"
subnet = "string"
allocated_addresses = 0
available_addresses = 0
dhcp_available = false
dns_servers = ["string"]
enabled = false
gateway = "string"
}
ipv6 = {
netmask = "string"
range = "string"
subnet = "string"
allocated_addresses = 0
available_addresses = 0
dhcp_available = false
dns_servers = ["string"]
enabled = false
gateway = "string"
}
name = "string"
network_ids = ["string"]
}
var networkProtocolProfileResource = new NetworkProtocolProfile("networkProtocolProfileResource", NetworkProtocolProfileArgs.builder()
.datacenterId("string")
.dnsDomain("string")
.dnsSearchPath("string")
.hostPrefix("string")
.httpProxy("string")
.ipv4(NetworkProtocolProfileIpv4Args.builder()
.netmask("string")
.range("string")
.subnet("string")
.allocatedAddresses(0)
.availableAddresses(0)
.dhcpAvailable(false)
.dnsServers("string")
.enabled(false)
.gateway("string")
.build())
.ipv6(NetworkProtocolProfileIpv6Args.builder()
.netmask("string")
.range("string")
.subnet("string")
.allocatedAddresses(0)
.availableAddresses(0)
.dhcpAvailable(false)
.dnsServers("string")
.enabled(false)
.gateway("string")
.build())
.name("string")
.networkIds("string")
.build());
network_protocol_profile_resource = vsphere.NetworkProtocolProfile("networkProtocolProfileResource",
datacenter_id="string",
dns_domain="string",
dns_search_path="string",
host_prefix="string",
http_proxy="string",
ipv4={
"netmask": "string",
"range": "string",
"subnet": "string",
"allocated_addresses": 0,
"available_addresses": 0,
"dhcp_available": False,
"dns_servers": ["string"],
"enabled": False,
"gateway": "string",
},
ipv6={
"netmask": "string",
"range": "string",
"subnet": "string",
"allocated_addresses": 0,
"available_addresses": 0,
"dhcp_available": False,
"dns_servers": ["string"],
"enabled": False,
"gateway": "string",
},
name="string",
network_ids=["string"])
const networkProtocolProfileResource = new vsphere.NetworkProtocolProfile("networkProtocolProfileResource", {
datacenterId: "string",
dnsDomain: "string",
dnsSearchPath: "string",
hostPrefix: "string",
httpProxy: "string",
ipv4: {
netmask: "string",
range: "string",
subnet: "string",
allocatedAddresses: 0,
availableAddresses: 0,
dhcpAvailable: false,
dnsServers: ["string"],
enabled: false,
gateway: "string",
},
ipv6: {
netmask: "string",
range: "string",
subnet: "string",
allocatedAddresses: 0,
availableAddresses: 0,
dhcpAvailable: false,
dnsServers: ["string"],
enabled: false,
gateway: "string",
},
name: "string",
networkIds: ["string"],
});
type: vsphere:NetworkProtocolProfile
properties:
datacenterId: string
dnsDomain: string
dnsSearchPath: string
hostPrefix: string
httpProxy: string
ipv4:
allocatedAddresses: 0
availableAddresses: 0
dhcpAvailable: false
dnsServers:
- string
enabled: false
gateway: string
netmask: string
range: string
subnet: string
ipv6:
allocatedAddresses: 0
availableAddresses: 0
dhcpAvailable: false
dnsServers:
- string
enabled: false
gateway: string
netmask: string
range: string
subnet: string
name: string
networkIds:
- string
NetworkProtocolProfile 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 NetworkProtocolProfile resource accepts the following input properties:
- Datacenter
Id string - The managed object ID of the datacenter this network protocol profile is associated with. Forces a new resource if changed.
- Dns
Domain string - The DNS domain to use for this network protocol
profile, for example
example.com. - Dns
Search stringPath - The DNS search path to use for this network
protocol profile, for example
eng.example.com;example.com. - Host
Prefix string - The prefix to use when generating host names for this network protocol profile.
- Http
Proxy string - The HTTP proxy to use on this network, in the
form of a host and port, for example
proxy.example.com:3128. - Ipv4
Pulumi.
VSphere. Inputs. Network Protocol Profile Ipv4 - An IPv4 configuration block, documented below. At
least one of
ipv4oripv6must be specified. - Ipv6
Pulumi.
VSphere. Inputs. Network Protocol Profile Ipv6 - An IPv6 configuration block, documented below. At
least one of
ipv4oripv6must be specified. - Name string
- The name of the network protocol profile.
- Network
Ids List<string> - The managed object IDs of the networks (standard port groups, distributed port groups, or opaque networks) associated with this network protocol profile.
- Datacenter
Id string - The managed object ID of the datacenter this network protocol profile is associated with. Forces a new resource if changed.
- Dns
Domain string - The DNS domain to use for this network protocol
profile, for example
example.com. - Dns
Search stringPath - The DNS search path to use for this network
protocol profile, for example
eng.example.com;example.com. - Host
Prefix string - The prefix to use when generating host names for this network protocol profile.
- Http
Proxy string - The HTTP proxy to use on this network, in the
form of a host and port, for example
proxy.example.com:3128. - Ipv4
Network
Protocol Profile Ipv4Args - An IPv4 configuration block, documented below. At
least one of
ipv4oripv6must be specified. - Ipv6
Network
Protocol Profile Ipv6Args - An IPv6 configuration block, documented below. At
least one of
ipv4oripv6must be specified. - Name string
- The name of the network protocol profile.
- Network
Ids []string - The managed object IDs of the networks (standard port groups, distributed port groups, or opaque networks) associated with this network protocol profile.
- datacenter_
id string - The managed object ID of the datacenter this network protocol profile is associated with. Forces a new resource if changed.
- dns_
domain string - The DNS domain to use for this network protocol
profile, for example
example.com. - dns_
search_ stringpath - The DNS search path to use for this network
protocol profile, for example
eng.example.com;example.com. - host_
prefix string - The prefix to use when generating host names for this network protocol profile.
- http_
proxy string - The HTTP proxy to use on this network, in the
form of a host and port, for example
proxy.example.com:3128. - ipv4 object
- An IPv4 configuration block, documented below. At
least one of
ipv4oripv6must be specified. - ipv6 object
- An IPv6 configuration block, documented below. At
least one of
ipv4oripv6must be specified. - name string
- The name of the network protocol profile.
- network_
ids list(string) - The managed object IDs of the networks (standard port groups, distributed port groups, or opaque networks) associated with this network protocol profile.
- datacenter
Id String - The managed object ID of the datacenter this network protocol profile is associated with. Forces a new resource if changed.
- dns
Domain String - The DNS domain to use for this network protocol
profile, for example
example.com. - dns
Search StringPath - The DNS search path to use for this network
protocol profile, for example
eng.example.com;example.com. - host
Prefix String - The prefix to use when generating host names for this network protocol profile.
- http
Proxy String - The HTTP proxy to use on this network, in the
form of a host and port, for example
proxy.example.com:3128. - ipv4
Network
Protocol Profile Ipv4 - An IPv4 configuration block, documented below. At
least one of
ipv4oripv6must be specified. - ipv6
Network
Protocol Profile Ipv6 - An IPv6 configuration block, documented below. At
least one of
ipv4oripv6must be specified. - name String
- The name of the network protocol profile.
- network
Ids List<String> - The managed object IDs of the networks (standard port groups, distributed port groups, or opaque networks) associated with this network protocol profile.
- datacenter
Id string - The managed object ID of the datacenter this network protocol profile is associated with. Forces a new resource if changed.
- dns
Domain string - The DNS domain to use for this network protocol
profile, for example
example.com. - dns
Search stringPath - The DNS search path to use for this network
protocol profile, for example
eng.example.com;example.com. - host
Prefix string - The prefix to use when generating host names for this network protocol profile.
- http
Proxy string - The HTTP proxy to use on this network, in the
form of a host and port, for example
proxy.example.com:3128. - ipv4
Network
Protocol Profile Ipv4 - An IPv4 configuration block, documented below. At
least one of
ipv4oripv6must be specified. - ipv6
Network
Protocol Profile Ipv6 - An IPv6 configuration block, documented below. At
least one of
ipv4oripv6must be specified. - name string
- The name of the network protocol profile.
- network
Ids string[] - The managed object IDs of the networks (standard port groups, distributed port groups, or opaque networks) associated with this network protocol profile.
- datacenter_
id str - The managed object ID of the datacenter this network protocol profile is associated with. Forces a new resource if changed.
- dns_
domain str - The DNS domain to use for this network protocol
profile, for example
example.com. - dns_
search_ strpath - The DNS search path to use for this network
protocol profile, for example
eng.example.com;example.com. - host_
prefix str - The prefix to use when generating host names for this network protocol profile.
- http_
proxy str - The HTTP proxy to use on this network, in the
form of a host and port, for example
proxy.example.com:3128. - ipv4
Network
Protocol Profile Ipv4Args - An IPv4 configuration block, documented below. At
least one of
ipv4oripv6must be specified. - ipv6
Network
Protocol Profile Ipv6Args - An IPv6 configuration block, documented below. At
least one of
ipv4oripv6must be specified. - name str
- The name of the network protocol profile.
- network_
ids Sequence[str] - The managed object IDs of the networks (standard port groups, distributed port groups, or opaque networks) associated with this network protocol profile.
- datacenter
Id String - The managed object ID of the datacenter this network protocol profile is associated with. Forces a new resource if changed.
- dns
Domain String - The DNS domain to use for this network protocol
profile, for example
example.com. - dns
Search StringPath - The DNS search path to use for this network
protocol profile, for example
eng.example.com;example.com. - host
Prefix String - The prefix to use when generating host names for this network protocol profile.
- http
Proxy String - The HTTP proxy to use on this network, in the
form of a host and port, for example
proxy.example.com:3128. - ipv4 Property Map
- An IPv4 configuration block, documented below. At
least one of
ipv4oripv6must be specified. - ipv6 Property Map
- An IPv6 configuration block, documented below. At
least one of
ipv4oripv6must be specified. - name String
- The name of the network protocol profile.
- network
Ids List<String> - The managed object IDs of the networks (standard port groups, distributed port groups, or opaque networks) associated with this network protocol profile.
Outputs
All input properties are implicitly available as output properties. Additionally, the NetworkProtocolProfile 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 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.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing NetworkProtocolProfile Resource
Get an existing NetworkProtocolProfile 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?: NetworkProtocolProfileState, opts?: CustomResourceOptions): NetworkProtocolProfile@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
datacenter_id: Optional[str] = None,
dns_domain: Optional[str] = None,
dns_search_path: Optional[str] = None,
host_prefix: Optional[str] = None,
http_proxy: Optional[str] = None,
ipv4: Optional[NetworkProtocolProfileIpv4Args] = None,
ipv6: Optional[NetworkProtocolProfileIpv6Args] = None,
name: Optional[str] = None,
network_ids: Optional[Sequence[str]] = None) -> NetworkProtocolProfilefunc GetNetworkProtocolProfile(ctx *Context, name string, id IDInput, state *NetworkProtocolProfileState, opts ...ResourceOption) (*NetworkProtocolProfile, error)public static NetworkProtocolProfile Get(string name, Input<string> id, NetworkProtocolProfileState? state, CustomResourceOptions? opts = null)public static NetworkProtocolProfile get(String name, Output<String> id, NetworkProtocolProfileState state, CustomResourceOptions options)resources: _: type: vsphere:NetworkProtocolProfile get: id: ${id}import {
to = vsphere_network_protocol_profile.example
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.
- Datacenter
Id string - The managed object ID of the datacenter this network protocol profile is associated with. Forces a new resource if changed.
- Dns
Domain string - The DNS domain to use for this network protocol
profile, for example
example.com. - Dns
Search stringPath - The DNS search path to use for this network
protocol profile, for example
eng.example.com;example.com. - Host
Prefix string - The prefix to use when generating host names for this network protocol profile.
- Http
Proxy string - The HTTP proxy to use on this network, in the
form of a host and port, for example
proxy.example.com:3128. - Ipv4
Pulumi.
VSphere. Inputs. Network Protocol Profile Ipv4 - An IPv4 configuration block, documented below. At
least one of
ipv4oripv6must be specified. - Ipv6
Pulumi.
VSphere. Inputs. Network Protocol Profile Ipv6 - An IPv6 configuration block, documented below. At
least one of
ipv4oripv6must be specified. - Name string
- The name of the network protocol profile.
- Network
Ids List<string> - The managed object IDs of the networks (standard port groups, distributed port groups, or opaque networks) associated with this network protocol profile.
- Datacenter
Id string - The managed object ID of the datacenter this network protocol profile is associated with. Forces a new resource if changed.
- Dns
Domain string - The DNS domain to use for this network protocol
profile, for example
example.com. - Dns
Search stringPath - The DNS search path to use for this network
protocol profile, for example
eng.example.com;example.com. - Host
Prefix string - The prefix to use when generating host names for this network protocol profile.
- Http
Proxy string - The HTTP proxy to use on this network, in the
form of a host and port, for example
proxy.example.com:3128. - Ipv4
Network
Protocol Profile Ipv4Args - An IPv4 configuration block, documented below. At
least one of
ipv4oripv6must be specified. - Ipv6
Network
Protocol Profile Ipv6Args - An IPv6 configuration block, documented below. At
least one of
ipv4oripv6must be specified. - Name string
- The name of the network protocol profile.
- Network
Ids []string - The managed object IDs of the networks (standard port groups, distributed port groups, or opaque networks) associated with this network protocol profile.
- datacenter_
id string - The managed object ID of the datacenter this network protocol profile is associated with. Forces a new resource if changed.
- dns_
domain string - The DNS domain to use for this network protocol
profile, for example
example.com. - dns_
search_ stringpath - The DNS search path to use for this network
protocol profile, for example
eng.example.com;example.com. - host_
prefix string - The prefix to use when generating host names for this network protocol profile.
- http_
proxy string - The HTTP proxy to use on this network, in the
form of a host and port, for example
proxy.example.com:3128. - ipv4 object
- An IPv4 configuration block, documented below. At
least one of
ipv4oripv6must be specified. - ipv6 object
- An IPv6 configuration block, documented below. At
least one of
ipv4oripv6must be specified. - name string
- The name of the network protocol profile.
- network_
ids list(string) - The managed object IDs of the networks (standard port groups, distributed port groups, or opaque networks) associated with this network protocol profile.
- datacenter
Id String - The managed object ID of the datacenter this network protocol profile is associated with. Forces a new resource if changed.
- dns
Domain String - The DNS domain to use for this network protocol
profile, for example
example.com. - dns
Search StringPath - The DNS search path to use for this network
protocol profile, for example
eng.example.com;example.com. - host
Prefix String - The prefix to use when generating host names for this network protocol profile.
- http
Proxy String - The HTTP proxy to use on this network, in the
form of a host and port, for example
proxy.example.com:3128. - ipv4
Network
Protocol Profile Ipv4 - An IPv4 configuration block, documented below. At
least one of
ipv4oripv6must be specified. - ipv6
Network
Protocol Profile Ipv6 - An IPv6 configuration block, documented below. At
least one of
ipv4oripv6must be specified. - name String
- The name of the network protocol profile.
- network
Ids List<String> - The managed object IDs of the networks (standard port groups, distributed port groups, or opaque networks) associated with this network protocol profile.
- datacenter
Id string - The managed object ID of the datacenter this network protocol profile is associated with. Forces a new resource if changed.
- dns
Domain string - The DNS domain to use for this network protocol
profile, for example
example.com. - dns
Search stringPath - The DNS search path to use for this network
protocol profile, for example
eng.example.com;example.com. - host
Prefix string - The prefix to use when generating host names for this network protocol profile.
- http
Proxy string - The HTTP proxy to use on this network, in the
form of a host and port, for example
proxy.example.com:3128. - ipv4
Network
Protocol Profile Ipv4 - An IPv4 configuration block, documented below. At
least one of
ipv4oripv6must be specified. - ipv6
Network
Protocol Profile Ipv6 - An IPv6 configuration block, documented below. At
least one of
ipv4oripv6must be specified. - name string
- The name of the network protocol profile.
- network
Ids string[] - The managed object IDs of the networks (standard port groups, distributed port groups, or opaque networks) associated with this network protocol profile.
- datacenter_
id str - The managed object ID of the datacenter this network protocol profile is associated with. Forces a new resource if changed.
- dns_
domain str - The DNS domain to use for this network protocol
profile, for example
example.com. - dns_
search_ strpath - The DNS search path to use for this network
protocol profile, for example
eng.example.com;example.com. - host_
prefix str - The prefix to use when generating host names for this network protocol profile.
- http_
proxy str - The HTTP proxy to use on this network, in the
form of a host and port, for example
proxy.example.com:3128. - ipv4
Network
Protocol Profile Ipv4Args - An IPv4 configuration block, documented below. At
least one of
ipv4oripv6must be specified. - ipv6
Network
Protocol Profile Ipv6Args - An IPv6 configuration block, documented below. At
least one of
ipv4oripv6must be specified. - name str
- The name of the network protocol profile.
- network_
ids Sequence[str] - The managed object IDs of the networks (standard port groups, distributed port groups, or opaque networks) associated with this network protocol profile.
- datacenter
Id String - The managed object ID of the datacenter this network protocol profile is associated with. Forces a new resource if changed.
- dns
Domain String - The DNS domain to use for this network protocol
profile, for example
example.com. - dns
Search StringPath - The DNS search path to use for this network
protocol profile, for example
eng.example.com;example.com. - host
Prefix String - The prefix to use when generating host names for this network protocol profile.
- http
Proxy String - The HTTP proxy to use on this network, in the
form of a host and port, for example
proxy.example.com:3128. - ipv4 Property Map
- An IPv4 configuration block, documented below. At
least one of
ipv4oripv6must be specified. - ipv6 Property Map
- An IPv6 configuration block, documented below. At
least one of
ipv4oripv6must be specified. - name String
- The name of the network protocol profile.
- network
Ids List<String> - The managed object IDs of the networks (standard port groups, distributed port groups, or opaque networks) associated with this network protocol profile.
Supporting Types
NetworkProtocolProfileIpv4, NetworkProtocolProfileIpv4Args
- Netmask string
- The IPv4 netmask of the subnet, for example "255.255.255.0".
- Range string
- The range(s) of addresses available for allocation, specified as one or more comma-separated "#" pairs, for example "10.10.10.2#250".
- Subnet string
- The IPv4 address of the subnet, for example "10.10.10.0".
- Allocated
Addresses int - The number of addresses currently allocated from this range.
- Available
Addresses int - The number of addresses available for allocation from this range.
- Dhcp
Available bool - Whether a DHCP server is available on this network.
- Dns
Servers List<string> - The DNS server addresses to use for this network protocol profile.
- Enabled bool
- Whether addresses can be allocated from this range.
- Gateway string
- The IPv4 gateway of the subnet.
- Netmask string
- The IPv4 netmask of the subnet, for example "255.255.255.0".
- Range string
- The range(s) of addresses available for allocation, specified as one or more comma-separated "#" pairs, for example "10.10.10.2#250".
- Subnet string
- The IPv4 address of the subnet, for example "10.10.10.0".
- Allocated
Addresses int - The number of addresses currently allocated from this range.
- Available
Addresses int - The number of addresses available for allocation from this range.
- Dhcp
Available bool - Whether a DHCP server is available on this network.
- Dns
Servers []string - The DNS server addresses to use for this network protocol profile.
- Enabled bool
- Whether addresses can be allocated from this range.
- Gateway string
- The IPv4 gateway of the subnet.
- netmask string
- The IPv4 netmask of the subnet, for example "255.255.255.0".
- range string
- The range(s) of addresses available for allocation, specified as one or more comma-separated "#" pairs, for example "10.10.10.2#250".
- subnet string
- The IPv4 address of the subnet, for example "10.10.10.0".
- allocated_
addresses number - The number of addresses currently allocated from this range.
- available_
addresses number - The number of addresses available for allocation from this range.
- dhcp_
available bool - Whether a DHCP server is available on this network.
- dns_
servers list(string) - The DNS server addresses to use for this network protocol profile.
- enabled bool
- Whether addresses can be allocated from this range.
- gateway string
- The IPv4 gateway of the subnet.
- netmask String
- The IPv4 netmask of the subnet, for example "255.255.255.0".
- range String
- The range(s) of addresses available for allocation, specified as one or more comma-separated "#" pairs, for example "10.10.10.2#250".
- subnet String
- The IPv4 address of the subnet, for example "10.10.10.0".
- allocated
Addresses Integer - The number of addresses currently allocated from this range.
- available
Addresses Integer - The number of addresses available for allocation from this range.
- dhcp
Available Boolean - Whether a DHCP server is available on this network.
- dns
Servers List<String> - The DNS server addresses to use for this network protocol profile.
- enabled Boolean
- Whether addresses can be allocated from this range.
- gateway String
- The IPv4 gateway of the subnet.
- netmask string
- The IPv4 netmask of the subnet, for example "255.255.255.0".
- range string
- The range(s) of addresses available for allocation, specified as one or more comma-separated "#" pairs, for example "10.10.10.2#250".
- subnet string
- The IPv4 address of the subnet, for example "10.10.10.0".
- allocated
Addresses number - The number of addresses currently allocated from this range.
- available
Addresses number - The number of addresses available for allocation from this range.
- dhcp
Available boolean - Whether a DHCP server is available on this network.
- dns
Servers string[] - The DNS server addresses to use for this network protocol profile.
- enabled boolean
- Whether addresses can be allocated from this range.
- gateway string
- The IPv4 gateway of the subnet.
- netmask str
- The IPv4 netmask of the subnet, for example "255.255.255.0".
- range str
- The range(s) of addresses available for allocation, specified as one or more comma-separated "#" pairs, for example "10.10.10.2#250".
- subnet str
- The IPv4 address of the subnet, for example "10.10.10.0".
- allocated_
addresses int - The number of addresses currently allocated from this range.
- available_
addresses int - The number of addresses available for allocation from this range.
- dhcp_
available bool - Whether a DHCP server is available on this network.
- dns_
servers Sequence[str] - The DNS server addresses to use for this network protocol profile.
- enabled bool
- Whether addresses can be allocated from this range.
- gateway str
- The IPv4 gateway of the subnet.
- netmask String
- The IPv4 netmask of the subnet, for example "255.255.255.0".
- range String
- The range(s) of addresses available for allocation, specified as one or more comma-separated "#" pairs, for example "10.10.10.2#250".
- subnet String
- The IPv4 address of the subnet, for example "10.10.10.0".
- allocated
Addresses Number - The number of addresses currently allocated from this range.
- available
Addresses Number - The number of addresses available for allocation from this range.
- dhcp
Available Boolean - Whether a DHCP server is available on this network.
- dns
Servers List<String> - The DNS server addresses to use for this network protocol profile.
- enabled Boolean
- Whether addresses can be allocated from this range.
- gateway String
- The IPv4 gateway of the subnet.
NetworkProtocolProfileIpv6, NetworkProtocolProfileIpv6Args
- Netmask string
- The IPv6 netmask of the subnet, for example "255.255.255.0".
- Range string
- The range(s) of addresses available for allocation, specified as one or more comma-separated "#" pairs, for example "10.10.10.2#250".
- Subnet string
- The IPv6 address of the subnet, for example "10.10.10.0".
- Allocated
Addresses int - The number of addresses currently allocated from this range.
- Available
Addresses int - The number of addresses available for allocation from this range.
- Dhcp
Available bool - Whether a DHCP server is available on this network.
- Dns
Servers List<string> - The DNS server addresses to use for this network protocol profile.
- Enabled bool
- Whether addresses can be allocated from this range.
- Gateway string
- The IPv6 gateway of the subnet.
- Netmask string
- The IPv6 netmask of the subnet, for example "255.255.255.0".
- Range string
- The range(s) of addresses available for allocation, specified as one or more comma-separated "#" pairs, for example "10.10.10.2#250".
- Subnet string
- The IPv6 address of the subnet, for example "10.10.10.0".
- Allocated
Addresses int - The number of addresses currently allocated from this range.
- Available
Addresses int - The number of addresses available for allocation from this range.
- Dhcp
Available bool - Whether a DHCP server is available on this network.
- Dns
Servers []string - The DNS server addresses to use for this network protocol profile.
- Enabled bool
- Whether addresses can be allocated from this range.
- Gateway string
- The IPv6 gateway of the subnet.
- netmask string
- The IPv6 netmask of the subnet, for example "255.255.255.0".
- range string
- The range(s) of addresses available for allocation, specified as one or more comma-separated "#" pairs, for example "10.10.10.2#250".
- subnet string
- The IPv6 address of the subnet, for example "10.10.10.0".
- allocated_
addresses number - The number of addresses currently allocated from this range.
- available_
addresses number - The number of addresses available for allocation from this range.
- dhcp_
available bool - Whether a DHCP server is available on this network.
- dns_
servers list(string) - The DNS server addresses to use for this network protocol profile.
- enabled bool
- Whether addresses can be allocated from this range.
- gateway string
- The IPv6 gateway of the subnet.
- netmask String
- The IPv6 netmask of the subnet, for example "255.255.255.0".
- range String
- The range(s) of addresses available for allocation, specified as one or more comma-separated "#" pairs, for example "10.10.10.2#250".
- subnet String
- The IPv6 address of the subnet, for example "10.10.10.0".
- allocated
Addresses Integer - The number of addresses currently allocated from this range.
- available
Addresses Integer - The number of addresses available for allocation from this range.
- dhcp
Available Boolean - Whether a DHCP server is available on this network.
- dns
Servers List<String> - The DNS server addresses to use for this network protocol profile.
- enabled Boolean
- Whether addresses can be allocated from this range.
- gateway String
- The IPv6 gateway of the subnet.
- netmask string
- The IPv6 netmask of the subnet, for example "255.255.255.0".
- range string
- The range(s) of addresses available for allocation, specified as one or more comma-separated "#" pairs, for example "10.10.10.2#250".
- subnet string
- The IPv6 address of the subnet, for example "10.10.10.0".
- allocated
Addresses number - The number of addresses currently allocated from this range.
- available
Addresses number - The number of addresses available for allocation from this range.
- dhcp
Available boolean - Whether a DHCP server is available on this network.
- dns
Servers string[] - The DNS server addresses to use for this network protocol profile.
- enabled boolean
- Whether addresses can be allocated from this range.
- gateway string
- The IPv6 gateway of the subnet.
- netmask str
- The IPv6 netmask of the subnet, for example "255.255.255.0".
- range str
- The range(s) of addresses available for allocation, specified as one or more comma-separated "#" pairs, for example "10.10.10.2#250".
- subnet str
- The IPv6 address of the subnet, for example "10.10.10.0".
- allocated_
addresses int - The number of addresses currently allocated from this range.
- available_
addresses int - The number of addresses available for allocation from this range.
- dhcp_
available bool - Whether a DHCP server is available on this network.
- dns_
servers Sequence[str] - The DNS server addresses to use for this network protocol profile.
- enabled bool
- Whether addresses can be allocated from this range.
- gateway str
- The IPv6 gateway of the subnet.
- netmask String
- The IPv6 netmask of the subnet, for example "255.255.255.0".
- range String
- The range(s) of addresses available for allocation, specified as one or more comma-separated "#" pairs, for example "10.10.10.2#250".
- subnet String
- The IPv6 address of the subnet, for example "10.10.10.0".
- allocated
Addresses Number - The number of addresses currently allocated from this range.
- available
Addresses Number - The number of addresses available for allocation from this range.
- dhcp
Available Boolean - Whether a DHCP server is available on this network.
- dns
Servers List<String> - The DNS server addresses to use for this network protocol profile.
- enabled Boolean
- Whether addresses can be allocated from this range.
- gateway String
- The IPv6 gateway of the subnet.
Import
An existing network protocol profile can be imported into this resource via a colon-separated combination of the datacenter’s managed object ID and either the network protocol profile’s name or its numeric ID, via the following command:
$ pulumi import vsphere:index/networkProtocolProfile:NetworkProtocolProfile profile datacenter-21:example-profile
or, using the numeric ID:
$ pulumi import vsphere:index/networkProtocolProfile:NetworkProtocolProfile profile datacenter-21:5
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- vSphere pulumi/pulumi-vsphere
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vsphereTerraform Provider.
published on Wednesday, Sep 2, 2026 by Pulumi