1. Packages
  2. Ibm Provider
  3. API Docs
  4. PiDhcp
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.PiDhcp

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Create, update, or delete DHCP Server for your Power Systems Virtual Server instance. For more information, see getting started with IBM Power Systems Virtual Servers.

    Example Usage

    The following example enables you to create a DHCP Server:

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const example = new ibm.PiDhcp("example", {piCloudInstanceId: "<value of the cloud_instance_id>"});
    
    import pulumi
    import pulumi_ibm as ibm
    
    example = ibm.PiDhcp("example", pi_cloud_instance_id="<value of the cloud_instance_id>")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.NewPiDhcp(ctx, "example", &ibm.PiDhcpArgs{
    			PiCloudInstanceId: pulumi.String("<value of the cloud_instance_id>"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Ibm.PiDhcp("example", new()
        {
            PiCloudInstanceId = "<value of the cloud_instance_id>",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.PiDhcp;
    import com.pulumi.ibm.PiDhcpArgs;
    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 example = new PiDhcp("example", PiDhcpArgs.builder()
                .piCloudInstanceId("<value of the cloud_instance_id>")
                .build());
    
        }
    }
    
    resources:
      example:
        type: ibm:PiDhcp
        properties:
          piCloudInstanceId: <value of the cloud_instance_id>
    

    Create PiDhcp Resource

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

    Constructor syntax

    new PiDhcp(name: string, args: PiDhcpArgs, opts?: CustomResourceOptions);
    @overload
    def PiDhcp(resource_name: str,
               args: PiDhcpArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def PiDhcp(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               pi_cloud_instance_id: Optional[str] = None,
               pi_cidr: Optional[str] = None,
               pi_cloud_connection_id: Optional[str] = None,
               pi_dhcp_id: Optional[str] = None,
               pi_dhcp_name: Optional[str] = None,
               pi_dhcp_snat_enabled: Optional[bool] = None,
               pi_dns_server: Optional[str] = None,
               timeouts: Optional[PiDhcpTimeoutsArgs] = None)
    func NewPiDhcp(ctx *Context, name string, args PiDhcpArgs, opts ...ResourceOption) (*PiDhcp, error)
    public PiDhcp(string name, PiDhcpArgs args, CustomResourceOptions? opts = null)
    public PiDhcp(String name, PiDhcpArgs args)
    public PiDhcp(String name, PiDhcpArgs args, CustomResourceOptions options)
    
    type: ibm:PiDhcp
    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 PiDhcpArgs
    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 PiDhcpArgs
    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 PiDhcpArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PiDhcpArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PiDhcpArgs
    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 piDhcpResource = new Ibm.PiDhcp("piDhcpResource", new()
    {
        PiCloudInstanceId = "string",
        PiCidr = "string",
        PiCloudConnectionId = "string",
        PiDhcpId = "string",
        PiDhcpName = "string",
        PiDhcpSnatEnabled = false,
        PiDnsServer = "string",
        Timeouts = new Ibm.Inputs.PiDhcpTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
        },
    });
    
    example, err := ibm.NewPiDhcp(ctx, "piDhcpResource", &ibm.PiDhcpArgs{
    	PiCloudInstanceId:   pulumi.String("string"),
    	PiCidr:              pulumi.String("string"),
    	PiCloudConnectionId: pulumi.String("string"),
    	PiDhcpId:            pulumi.String("string"),
    	PiDhcpName:          pulumi.String("string"),
    	PiDhcpSnatEnabled:   pulumi.Bool(false),
    	PiDnsServer:         pulumi.String("string"),
    	Timeouts: &ibm.PiDhcpTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    	},
    })
    
    var piDhcpResource = new PiDhcp("piDhcpResource", PiDhcpArgs.builder()
        .piCloudInstanceId("string")
        .piCidr("string")
        .piCloudConnectionId("string")
        .piDhcpId("string")
        .piDhcpName("string")
        .piDhcpSnatEnabled(false)
        .piDnsServer("string")
        .timeouts(PiDhcpTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .build())
        .build());
    
    pi_dhcp_resource = ibm.PiDhcp("piDhcpResource",
        pi_cloud_instance_id="string",
        pi_cidr="string",
        pi_cloud_connection_id="string",
        pi_dhcp_id="string",
        pi_dhcp_name="string",
        pi_dhcp_snat_enabled=False,
        pi_dns_server="string",
        timeouts={
            "create": "string",
            "delete": "string",
        })
    
    const piDhcpResource = new ibm.PiDhcp("piDhcpResource", {
        piCloudInstanceId: "string",
        piCidr: "string",
        piCloudConnectionId: "string",
        piDhcpId: "string",
        piDhcpName: "string",
        piDhcpSnatEnabled: false,
        piDnsServer: "string",
        timeouts: {
            create: "string",
            "delete": "string",
        },
    });
    
    type: ibm:PiDhcp
    properties:
        piCidr: string
        piCloudConnectionId: string
        piCloudInstanceId: string
        piDhcpId: string
        piDhcpName: string
        piDhcpSnatEnabled: false
        piDnsServer: string
        timeouts:
            create: string
            delete: string
    

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

    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiCidr string
    The CIDR for the DHCP private network.
    PiCloudConnectionId string
    The Cloud Connection UUID to connect with the DHCP private network.
    PiDhcpId string
    (String) The unique identifier of the DHCP Server. The ID is composed of <pi_cloud_instance_id>/<dhcp_id>.
    PiDhcpName string
    The name of the DHCP Service that will be prefixed by the DHCP identifier.
    PiDhcpSnatEnabled bool
    Indicates if SNAT will be enabled for the DHCP service. The default value is true.
    PiDnsServer string
    The DNS Server for the DHCP service.
    Timeouts PiDhcpTimeouts
    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiCidr string
    The CIDR for the DHCP private network.
    PiCloudConnectionId string
    The Cloud Connection UUID to connect with the DHCP private network.
    PiDhcpId string
    (String) The unique identifier of the DHCP Server. The ID is composed of <pi_cloud_instance_id>/<dhcp_id>.
    PiDhcpName string
    The name of the DHCP Service that will be prefixed by the DHCP identifier.
    PiDhcpSnatEnabled bool
    Indicates if SNAT will be enabled for the DHCP service. The default value is true.
    PiDnsServer string
    The DNS Server for the DHCP service.
    Timeouts PiDhcpTimeoutsArgs
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piCidr String
    The CIDR for the DHCP private network.
    piCloudConnectionId String
    The Cloud Connection UUID to connect with the DHCP private network.
    piDhcpId String
    (String) The unique identifier of the DHCP Server. The ID is composed of <pi_cloud_instance_id>/<dhcp_id>.
    piDhcpName String
    The name of the DHCP Service that will be prefixed by the DHCP identifier.
    piDhcpSnatEnabled Boolean
    Indicates if SNAT will be enabled for the DHCP service. The default value is true.
    piDnsServer String
    The DNS Server for the DHCP service.
    timeouts PiDhcpTimeouts
    piCloudInstanceId string
    The GUID of the service instance associated with an account.
    piCidr string
    The CIDR for the DHCP private network.
    piCloudConnectionId string
    The Cloud Connection UUID to connect with the DHCP private network.
    piDhcpId string
    (String) The unique identifier of the DHCP Server. The ID is composed of <pi_cloud_instance_id>/<dhcp_id>.
    piDhcpName string
    The name of the DHCP Service that will be prefixed by the DHCP identifier.
    piDhcpSnatEnabled boolean
    Indicates if SNAT will be enabled for the DHCP service. The default value is true.
    piDnsServer string
    The DNS Server for the DHCP service.
    timeouts PiDhcpTimeouts
    pi_cloud_instance_id str
    The GUID of the service instance associated with an account.
    pi_cidr str
    The CIDR for the DHCP private network.
    pi_cloud_connection_id str
    The Cloud Connection UUID to connect with the DHCP private network.
    pi_dhcp_id str
    (String) The unique identifier of the DHCP Server. The ID is composed of <pi_cloud_instance_id>/<dhcp_id>.
    pi_dhcp_name str
    The name of the DHCP Service that will be prefixed by the DHCP identifier.
    pi_dhcp_snat_enabled bool
    Indicates if SNAT will be enabled for the DHCP service. The default value is true.
    pi_dns_server str
    The DNS Server for the DHCP service.
    timeouts PiDhcpTimeoutsArgs
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piCidr String
    The CIDR for the DHCP private network.
    piCloudConnectionId String
    The Cloud Connection UUID to connect with the DHCP private network.
    piDhcpId String
    (String) The unique identifier of the DHCP Server. The ID is composed of <pi_cloud_instance_id>/<dhcp_id>.
    piDhcpName String
    The name of the DHCP Service that will be prefixed by the DHCP identifier.
    piDhcpSnatEnabled Boolean
    Indicates if SNAT will be enabled for the DHCP service. The default value is true.
    piDnsServer String
    The DNS Server for the DHCP service.
    timeouts Property Map

    Outputs

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

    DhcpId string
    (String) The ID of the DHCP Server.
    Id string
    The provider-assigned unique ID for this managed resource.
    Leases List<PiDhcpLease>
    (List) The list of DHCP Server PVM Instance leases. Nested scheme for leases:
    NetworkId string
    (String) The ID of the DHCP Server private network.
    NetworkName string
    The name of the DHCP Server private network.
    Status string
    (String) The status of the DHCP Server.
    DhcpId string
    (String) The ID of the DHCP Server.
    Id string
    The provider-assigned unique ID for this managed resource.
    Leases []PiDhcpLease
    (List) The list of DHCP Server PVM Instance leases. Nested scheme for leases:
    NetworkId string
    (String) The ID of the DHCP Server private network.
    NetworkName string
    The name of the DHCP Server private network.
    Status string
    (String) The status of the DHCP Server.
    dhcpId String
    (String) The ID of the DHCP Server.
    id String
    The provider-assigned unique ID for this managed resource.
    leases List<PiDhcpLease>
    (List) The list of DHCP Server PVM Instance leases. Nested scheme for leases:
    networkId String
    (String) The ID of the DHCP Server private network.
    networkName String
    The name of the DHCP Server private network.
    status String
    (String) The status of the DHCP Server.
    dhcpId string
    (String) The ID of the DHCP Server.
    id string
    The provider-assigned unique ID for this managed resource.
    leases PiDhcpLease[]
    (List) The list of DHCP Server PVM Instance leases. Nested scheme for leases:
    networkId string
    (String) The ID of the DHCP Server private network.
    networkName string
    The name of the DHCP Server private network.
    status string
    (String) The status of the DHCP Server.
    dhcp_id str
    (String) The ID of the DHCP Server.
    id str
    The provider-assigned unique ID for this managed resource.
    leases Sequence[PiDhcpLease]
    (List) The list of DHCP Server PVM Instance leases. Nested scheme for leases:
    network_id str
    (String) The ID of the DHCP Server private network.
    network_name str
    The name of the DHCP Server private network.
    status str
    (String) The status of the DHCP Server.
    dhcpId String
    (String) The ID of the DHCP Server.
    id String
    The provider-assigned unique ID for this managed resource.
    leases List<Property Map>
    (List) The list of DHCP Server PVM Instance leases. Nested scheme for leases:
    networkId String
    (String) The ID of the DHCP Server private network.
    networkName String
    The name of the DHCP Server private network.
    status String
    (String) The status of the DHCP Server.

    Look up Existing PiDhcp Resource

    Get an existing PiDhcp 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?: PiDhcpState, opts?: CustomResourceOptions): PiDhcp
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            dhcp_id: Optional[str] = None,
            leases: Optional[Sequence[PiDhcpLeaseArgs]] = None,
            network_id: Optional[str] = None,
            network_name: Optional[str] = None,
            pi_cidr: Optional[str] = None,
            pi_cloud_connection_id: Optional[str] = None,
            pi_cloud_instance_id: Optional[str] = None,
            pi_dhcp_id: Optional[str] = None,
            pi_dhcp_name: Optional[str] = None,
            pi_dhcp_snat_enabled: Optional[bool] = None,
            pi_dns_server: Optional[str] = None,
            status: Optional[str] = None,
            timeouts: Optional[PiDhcpTimeoutsArgs] = None) -> PiDhcp
    func GetPiDhcp(ctx *Context, name string, id IDInput, state *PiDhcpState, opts ...ResourceOption) (*PiDhcp, error)
    public static PiDhcp Get(string name, Input<string> id, PiDhcpState? state, CustomResourceOptions? opts = null)
    public static PiDhcp get(String name, Output<String> id, PiDhcpState state, CustomResourceOptions options)
    resources:  _:    type: ibm:PiDhcp    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:
    DhcpId string
    (String) The ID of the DHCP Server.
    Leases List<PiDhcpLease>
    (List) The list of DHCP Server PVM Instance leases. Nested scheme for leases:
    NetworkId string
    (String) The ID of the DHCP Server private network.
    NetworkName string
    The name of the DHCP Server private network.
    PiCidr string
    The CIDR for the DHCP private network.
    PiCloudConnectionId string
    The Cloud Connection UUID to connect with the DHCP private network.
    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiDhcpId string
    (String) The unique identifier of the DHCP Server. The ID is composed of <pi_cloud_instance_id>/<dhcp_id>.
    PiDhcpName string
    The name of the DHCP Service that will be prefixed by the DHCP identifier.
    PiDhcpSnatEnabled bool
    Indicates if SNAT will be enabled for the DHCP service. The default value is true.
    PiDnsServer string
    The DNS Server for the DHCP service.
    Status string
    (String) The status of the DHCP Server.
    Timeouts PiDhcpTimeouts
    DhcpId string
    (String) The ID of the DHCP Server.
    Leases []PiDhcpLeaseArgs
    (List) The list of DHCP Server PVM Instance leases. Nested scheme for leases:
    NetworkId string
    (String) The ID of the DHCP Server private network.
    NetworkName string
    The name of the DHCP Server private network.
    PiCidr string
    The CIDR for the DHCP private network.
    PiCloudConnectionId string
    The Cloud Connection UUID to connect with the DHCP private network.
    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiDhcpId string
    (String) The unique identifier of the DHCP Server. The ID is composed of <pi_cloud_instance_id>/<dhcp_id>.
    PiDhcpName string
    The name of the DHCP Service that will be prefixed by the DHCP identifier.
    PiDhcpSnatEnabled bool
    Indicates if SNAT will be enabled for the DHCP service. The default value is true.
    PiDnsServer string
    The DNS Server for the DHCP service.
    Status string
    (String) The status of the DHCP Server.
    Timeouts PiDhcpTimeoutsArgs
    dhcpId String
    (String) The ID of the DHCP Server.
    leases List<PiDhcpLease>
    (List) The list of DHCP Server PVM Instance leases. Nested scheme for leases:
    networkId String
    (String) The ID of the DHCP Server private network.
    networkName String
    The name of the DHCP Server private network.
    piCidr String
    The CIDR for the DHCP private network.
    piCloudConnectionId String
    The Cloud Connection UUID to connect with the DHCP private network.
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piDhcpId String
    (String) The unique identifier of the DHCP Server. The ID is composed of <pi_cloud_instance_id>/<dhcp_id>.
    piDhcpName String
    The name of the DHCP Service that will be prefixed by the DHCP identifier.
    piDhcpSnatEnabled Boolean
    Indicates if SNAT will be enabled for the DHCP service. The default value is true.
    piDnsServer String
    The DNS Server for the DHCP service.
    status String
    (String) The status of the DHCP Server.
    timeouts PiDhcpTimeouts
    dhcpId string
    (String) The ID of the DHCP Server.
    leases PiDhcpLease[]
    (List) The list of DHCP Server PVM Instance leases. Nested scheme for leases:
    networkId string
    (String) The ID of the DHCP Server private network.
    networkName string
    The name of the DHCP Server private network.
    piCidr string
    The CIDR for the DHCP private network.
    piCloudConnectionId string
    The Cloud Connection UUID to connect with the DHCP private network.
    piCloudInstanceId string
    The GUID of the service instance associated with an account.
    piDhcpId string
    (String) The unique identifier of the DHCP Server. The ID is composed of <pi_cloud_instance_id>/<dhcp_id>.
    piDhcpName string
    The name of the DHCP Service that will be prefixed by the DHCP identifier.
    piDhcpSnatEnabled boolean
    Indicates if SNAT will be enabled for the DHCP service. The default value is true.
    piDnsServer string
    The DNS Server for the DHCP service.
    status string
    (String) The status of the DHCP Server.
    timeouts PiDhcpTimeouts
    dhcp_id str
    (String) The ID of the DHCP Server.
    leases Sequence[PiDhcpLeaseArgs]
    (List) The list of DHCP Server PVM Instance leases. Nested scheme for leases:
    network_id str
    (String) The ID of the DHCP Server private network.
    network_name str
    The name of the DHCP Server private network.
    pi_cidr str
    The CIDR for the DHCP private network.
    pi_cloud_connection_id str
    The Cloud Connection UUID to connect with the DHCP private network.
    pi_cloud_instance_id str
    The GUID of the service instance associated with an account.
    pi_dhcp_id str
    (String) The unique identifier of the DHCP Server. The ID is composed of <pi_cloud_instance_id>/<dhcp_id>.
    pi_dhcp_name str
    The name of the DHCP Service that will be prefixed by the DHCP identifier.
    pi_dhcp_snat_enabled bool
    Indicates if SNAT will be enabled for the DHCP service. The default value is true.
    pi_dns_server str
    The DNS Server for the DHCP service.
    status str
    (String) The status of the DHCP Server.
    timeouts PiDhcpTimeoutsArgs
    dhcpId String
    (String) The ID of the DHCP Server.
    leases List<Property Map>
    (List) The list of DHCP Server PVM Instance leases. Nested scheme for leases:
    networkId String
    (String) The ID of the DHCP Server private network.
    networkName String
    The name of the DHCP Server private network.
    piCidr String
    The CIDR for the DHCP private network.
    piCloudConnectionId String
    The Cloud Connection UUID to connect with the DHCP private network.
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piDhcpId String
    (String) The unique identifier of the DHCP Server. The ID is composed of <pi_cloud_instance_id>/<dhcp_id>.
    piDhcpName String
    The name of the DHCP Service that will be prefixed by the DHCP identifier.
    piDhcpSnatEnabled Boolean
    Indicates if SNAT will be enabled for the DHCP service. The default value is true.
    piDnsServer String
    The DNS Server for the DHCP service.
    status String
    (String) The status of the DHCP Server.
    timeouts Property Map

    Supporting Types

    PiDhcpLease, PiDhcpLeaseArgs

    InstanceIp string
    (String) The IP of the PVM Instance.
    InstanceMac string
    (String) The MAC Address of the PVM Instance.
    InstanceIp string
    (String) The IP of the PVM Instance.
    InstanceMac string
    (String) The MAC Address of the PVM Instance.
    instanceIp String
    (String) The IP of the PVM Instance.
    instanceMac String
    (String) The MAC Address of the PVM Instance.
    instanceIp string
    (String) The IP of the PVM Instance.
    instanceMac string
    (String) The MAC Address of the PVM Instance.
    instance_ip str
    (String) The IP of the PVM Instance.
    instance_mac str
    (String) The MAC Address of the PVM Instance.
    instanceIp String
    (String) The IP of the PVM Instance.
    instanceMac String
    (String) The MAC Address of the PVM Instance.

    PiDhcpTimeouts, PiDhcpTimeoutsArgs

    Create string
    Delete string
    Create string
    Delete string
    create String
    delete String
    create string
    delete string
    create str
    delete str
    create String
    delete String

    Import

    The ibm_pi_dhcp resource can be imported by using pi_cloud_instance_id and dhcp_id.

    bash

    $ pulumi import ibm:index/piDhcp:PiDhcp example d7bec597-4726-451f-8a63-e62e6f19c32c/0e48e1be-9f54-4a67-ba55-7e31ce98b65a
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud