1. Packages
  2. Packages
  3. Nutanix
  4. API Docs
  5. VmNetworkDeviceAssignIpV2
Viewing docs for Nutanix v0.13.0
published on Tuesday, Apr 28, 2026 by Piers Karsenbarg
nutanix logo
Viewing docs for Nutanix v0.13.0
published on Tuesday, Apr 28, 2026 by Piers Karsenbarg

    Provides a Nutanix Virtual Machine resource to Assign IP.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as nutanix from "@pierskarsenbarg/nutanix";
    
    const nicAssignIp = new nutanix.VmNetworkDeviceAssignIpV2("nic_assign_ip", {
        vmExtId: "246f6e8a-ff05-4057-af6b-b1fd23a46d7d",
        extId: "eb0157e7-4a87-4ba6-ac8f-62cfe6251b8b",
        ipAddresses: [{
            value: "10.10.10.10",
            prefixLength: 32,
        }],
    });
    
    import pulumi
    import pulumi_nutanix as nutanix
    
    nic_assign_ip = nutanix.VmNetworkDeviceAssignIpV2("nic_assign_ip",
        vm_ext_id="246f6e8a-ff05-4057-af6b-b1fd23a46d7d",
        ext_id="eb0157e7-4a87-4ba6-ac8f-62cfe6251b8b",
        ip_addresses=[{
            "value": "10.10.10.10",
            "prefix_length": 32,
        }])
    
    package main
    
    import (
    	"github.com/pierskarsenbarg/pulumi-nutanix/sdk/go/nutanix"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := nutanix.NewVmNetworkDeviceAssignIpV2(ctx, "nic_assign_ip", &nutanix.VmNetworkDeviceAssignIpV2Args{
    			VmExtId: pulumi.String("246f6e8a-ff05-4057-af6b-b1fd23a46d7d"),
    			ExtId:   pulumi.String("eb0157e7-4a87-4ba6-ac8f-62cfe6251b8b"),
    			IpAddresses: nutanix.VmNetworkDeviceAssignIpV2IpAddressArray{
    				&nutanix.VmNetworkDeviceAssignIpV2IpAddressArgs{
    					Value:        pulumi.String("10.10.10.10"),
    					PrefixLength: pulumi.Int(32),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nutanix = PiersKarsenbarg.Nutanix;
    
    return await Deployment.RunAsync(() => 
    {
        var nicAssignIp = new Nutanix.Index.VmNetworkDeviceAssignIpV2("nic_assign_ip", new()
        {
            VmExtId = "246f6e8a-ff05-4057-af6b-b1fd23a46d7d",
            ExtId = "eb0157e7-4a87-4ba6-ac8f-62cfe6251b8b",
            IpAddresses = new[]
            {
                new Nutanix.Inputs.VmNetworkDeviceAssignIpV2IpAddressArgs
                {
                    Value = "10.10.10.10",
                    PrefixLength = 32,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.nutanix.VmNetworkDeviceAssignIpV2;
    import com.pulumi.nutanix.VmNetworkDeviceAssignIpV2Args;
    import com.pulumi.nutanix.inputs.VmNetworkDeviceAssignIpV2IpAddressArgs;
    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 nicAssignIp = new VmNetworkDeviceAssignIpV2("nicAssignIp", VmNetworkDeviceAssignIpV2Args.builder()
                .vmExtId("246f6e8a-ff05-4057-af6b-b1fd23a46d7d")
                .extId("eb0157e7-4a87-4ba6-ac8f-62cfe6251b8b")
                .ipAddresses(VmNetworkDeviceAssignIpV2IpAddressArgs.builder()
                    .value("10.10.10.10")
                    .prefixLength(32)
                    .build())
                .build());
    
        }
    }
    
    resources:
      nicAssignIp:
        type: nutanix:VmNetworkDeviceAssignIpV2
        name: nic_assign_ip
        properties:
          vmExtId: 246f6e8a-ff05-4057-af6b-b1fd23a46d7d
          extId: eb0157e7-4a87-4ba6-ac8f-62cfe6251b8b
          ipAddresses:
            - value: 10.10.10.10
              prefixLength: 32
    

    Create VmNetworkDeviceAssignIpV2 Resource

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

    Constructor syntax

    new VmNetworkDeviceAssignIpV2(name: string, args: VmNetworkDeviceAssignIpV2Args, opts?: CustomResourceOptions);
    @overload
    def VmNetworkDeviceAssignIpV2(resource_name: str,
                                  args: VmNetworkDeviceAssignIpV2Args,
                                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def VmNetworkDeviceAssignIpV2(resource_name: str,
                                  opts: Optional[ResourceOptions] = None,
                                  ext_id: Optional[str] = None,
                                  vm_ext_id: Optional[str] = None,
                                  ip_addresses: Optional[Sequence[VmNetworkDeviceAssignIpV2IpAddressArgs]] = None)
    func NewVmNetworkDeviceAssignIpV2(ctx *Context, name string, args VmNetworkDeviceAssignIpV2Args, opts ...ResourceOption) (*VmNetworkDeviceAssignIpV2, error)
    public VmNetworkDeviceAssignIpV2(string name, VmNetworkDeviceAssignIpV2Args args, CustomResourceOptions? opts = null)
    public VmNetworkDeviceAssignIpV2(String name, VmNetworkDeviceAssignIpV2Args args)
    public VmNetworkDeviceAssignIpV2(String name, VmNetworkDeviceAssignIpV2Args args, CustomResourceOptions options)
    
    type: nutanix:VmNetworkDeviceAssignIpV2
    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 VmNetworkDeviceAssignIpV2Args
    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 VmNetworkDeviceAssignIpV2Args
    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 VmNetworkDeviceAssignIpV2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VmNetworkDeviceAssignIpV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VmNetworkDeviceAssignIpV2Args
    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 vmNetworkDeviceAssignIpV2Resource = new Nutanix.VmNetworkDeviceAssignIpV2("vmNetworkDeviceAssignIpV2Resource", new()
    {
        ExtId = "string",
        VmExtId = "string",
        IpAddresses = new[]
        {
            new Nutanix.Inputs.VmNetworkDeviceAssignIpV2IpAddressArgs
            {
                Value = "string",
                PrefixLength = 0,
            },
        },
    });
    
    example, err := nutanix.NewVmNetworkDeviceAssignIpV2(ctx, "vmNetworkDeviceAssignIpV2Resource", &nutanix.VmNetworkDeviceAssignIpV2Args{
    	ExtId:   pulumi.String("string"),
    	VmExtId: pulumi.String("string"),
    	IpAddresses: nutanix.VmNetworkDeviceAssignIpV2IpAddressArray{
    		&nutanix.VmNetworkDeviceAssignIpV2IpAddressArgs{
    			Value:        pulumi.String("string"),
    			PrefixLength: pulumi.Int(0),
    		},
    	},
    })
    
    var vmNetworkDeviceAssignIpV2Resource = new VmNetworkDeviceAssignIpV2("vmNetworkDeviceAssignIpV2Resource", VmNetworkDeviceAssignIpV2Args.builder()
        .extId("string")
        .vmExtId("string")
        .ipAddresses(VmNetworkDeviceAssignIpV2IpAddressArgs.builder()
            .value("string")
            .prefixLength(0)
            .build())
        .build());
    
    vm_network_device_assign_ip_v2_resource = nutanix.VmNetworkDeviceAssignIpV2("vmNetworkDeviceAssignIpV2Resource",
        ext_id="string",
        vm_ext_id="string",
        ip_addresses=[{
            "value": "string",
            "prefix_length": 0,
        }])
    
    const vmNetworkDeviceAssignIpV2Resource = new nutanix.VmNetworkDeviceAssignIpV2("vmNetworkDeviceAssignIpV2Resource", {
        extId: "string",
        vmExtId: "string",
        ipAddresses: [{
            value: "string",
            prefixLength: 0,
        }],
    });
    
    type: nutanix:VmNetworkDeviceAssignIpV2
    properties:
        extId: string
        ipAddresses:
            - prefixLength: 0
              value: string
        vmExtId: string
    

    VmNetworkDeviceAssignIpV2 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 VmNetworkDeviceAssignIpV2 resource accepts the following input properties:

    ExtId string
    • (Required) The globally unique identifier of a Nic. It should be of type UUID.
    VmExtId string
    • (Required) The globally unique identifier of a VM. It should be of type UUID.
    IpAddresses List<PiersKarsenbarg.Nutanix.Inputs.VmNetworkDeviceAssignIpV2IpAddress>
    • (Optional) Ip config settings.
    ExtId string
    • (Required) The globally unique identifier of a Nic. It should be of type UUID.
    VmExtId string
    • (Required) The globally unique identifier of a VM. It should be of type UUID.
    IpAddresses []VmNetworkDeviceAssignIpV2IpAddressArgs
    • (Optional) Ip config settings.
    extId String
    • (Required) The globally unique identifier of a Nic. It should be of type UUID.
    vmExtId String
    • (Required) The globally unique identifier of a VM. It should be of type UUID.
    ipAddresses List<VmNetworkDeviceAssignIpV2IpAddress>
    • (Optional) Ip config settings.
    extId string
    • (Required) The globally unique identifier of a Nic. It should be of type UUID.
    vmExtId string
    • (Required) The globally unique identifier of a VM. It should be of type UUID.
    ipAddresses VmNetworkDeviceAssignIpV2IpAddress[]
    • (Optional) Ip config settings.
    ext_id str
    • (Required) The globally unique identifier of a Nic. It should be of type UUID.
    vm_ext_id str
    • (Required) The globally unique identifier of a VM. It should be of type UUID.
    ip_addresses Sequence[VmNetworkDeviceAssignIpV2IpAddressArgs]
    • (Optional) Ip config settings.
    extId String
    • (Required) The globally unique identifier of a Nic. It should be of type UUID.
    vmExtId String
    • (Required) The globally unique identifier of a VM. It should be of type UUID.
    ipAddresses List<Property Map>
    • (Optional) Ip config settings.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the VmNetworkDeviceAssignIpV2 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 str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing VmNetworkDeviceAssignIpV2 Resource

    Get an existing VmNetworkDeviceAssignIpV2 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?: VmNetworkDeviceAssignIpV2State, opts?: CustomResourceOptions): VmNetworkDeviceAssignIpV2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            ext_id: Optional[str] = None,
            ip_addresses: Optional[Sequence[VmNetworkDeviceAssignIpV2IpAddressArgs]] = None,
            vm_ext_id: Optional[str] = None) -> VmNetworkDeviceAssignIpV2
    func GetVmNetworkDeviceAssignIpV2(ctx *Context, name string, id IDInput, state *VmNetworkDeviceAssignIpV2State, opts ...ResourceOption) (*VmNetworkDeviceAssignIpV2, error)
    public static VmNetworkDeviceAssignIpV2 Get(string name, Input<string> id, VmNetworkDeviceAssignIpV2State? state, CustomResourceOptions? opts = null)
    public static VmNetworkDeviceAssignIpV2 get(String name, Output<String> id, VmNetworkDeviceAssignIpV2State state, CustomResourceOptions options)
    resources:  _:    type: nutanix:VmNetworkDeviceAssignIpV2    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:
    ExtId string
    • (Required) The globally unique identifier of a Nic. It should be of type UUID.
    IpAddresses List<PiersKarsenbarg.Nutanix.Inputs.VmNetworkDeviceAssignIpV2IpAddress>
    • (Optional) Ip config settings.
    VmExtId string
    • (Required) The globally unique identifier of a VM. It should be of type UUID.
    ExtId string
    • (Required) The globally unique identifier of a Nic. It should be of type UUID.
    IpAddresses []VmNetworkDeviceAssignIpV2IpAddressArgs
    • (Optional) Ip config settings.
    VmExtId string
    • (Required) The globally unique identifier of a VM. It should be of type UUID.
    extId String
    • (Required) The globally unique identifier of a Nic. It should be of type UUID.
    ipAddresses List<VmNetworkDeviceAssignIpV2IpAddress>
    • (Optional) Ip config settings.
    vmExtId String
    • (Required) The globally unique identifier of a VM. It should be of type UUID.
    extId string
    • (Required) The globally unique identifier of a Nic. It should be of type UUID.
    ipAddresses VmNetworkDeviceAssignIpV2IpAddress[]
    • (Optional) Ip config settings.
    vmExtId string
    • (Required) The globally unique identifier of a VM. It should be of type UUID.
    ext_id str
    • (Required) The globally unique identifier of a Nic. It should be of type UUID.
    ip_addresses Sequence[VmNetworkDeviceAssignIpV2IpAddressArgs]
    • (Optional) Ip config settings.
    vm_ext_id str
    • (Required) The globally unique identifier of a VM. It should be of type UUID.
    extId String
    • (Required) The globally unique identifier of a Nic. It should be of type UUID.
    ipAddresses List<Property Map>
    • (Optional) Ip config settings.
    vmExtId String
    • (Required) The globally unique identifier of a VM. It should be of type UUID.

    Supporting Types

    VmNetworkDeviceAssignIpV2IpAddress, VmNetworkDeviceAssignIpV2IpAddressArgs

    Value string
    • Ip address.

    See detailed information in Nutanix Assign an IP address to the VM V4.

    PrefixLength int
    • (Optional) The prefix length of the network to which this host IPv4 address belongs.
    Value string
    • Ip address.

    See detailed information in Nutanix Assign an IP address to the VM V4.

    PrefixLength int
    • (Optional) The prefix length of the network to which this host IPv4 address belongs.
    value String
    • Ip address.

    See detailed information in Nutanix Assign an IP address to the VM V4.

    prefixLength Integer
    • (Optional) The prefix length of the network to which this host IPv4 address belongs.
    value string
    • Ip address.

    See detailed information in Nutanix Assign an IP address to the VM V4.

    prefixLength number
    • (Optional) The prefix length of the network to which this host IPv4 address belongs.
    value str
    • Ip address.

    See detailed information in Nutanix Assign an IP address to the VM V4.

    prefix_length int
    • (Optional) The prefix length of the network to which this host IPv4 address belongs.
    value String
    • Ip address.

    See detailed information in Nutanix Assign an IP address to the VM V4.

    prefixLength Number
    • (Optional) The prefix length of the network to which this host IPv4 address belongs.

    Package Details

    Repository
    nutanix pierskarsenbarg/pulumi-nutanix
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the nutanix Terraform Provider.
    nutanix logo
    Viewing docs for Nutanix v0.13.0
    published on Tuesday, Apr 28, 2026 by Piers Karsenbarg
      Try Pulumi Cloud free. Your team will thank you.