ibm.PiDhcp
Explore with Pulumi AI
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:
- Pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- Pi
Cidr string - The CIDR for the DHCP private network.
- Pi
Cloud stringConnection Id - The Cloud Connection UUID to connect with the DHCP private network.
- Pi
Dhcp stringId - (String) The unique identifier of the DHCP Server. The ID is composed of
<pi_cloud_instance_id>/<dhcp_id>
. - Pi
Dhcp stringName - The name of the DHCP Service that will be prefixed by the DHCP identifier.
- Pi
Dhcp boolSnat Enabled - Indicates if SNAT will be enabled for the DHCP service. The default value is true.
- Pi
Dns stringServer - The DNS Server for the DHCP service.
- Timeouts
Pi
Dhcp Timeouts
- Pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- Pi
Cidr string - The CIDR for the DHCP private network.
- Pi
Cloud stringConnection Id - The Cloud Connection UUID to connect with the DHCP private network.
- Pi
Dhcp stringId - (String) The unique identifier of the DHCP Server. The ID is composed of
<pi_cloud_instance_id>/<dhcp_id>
. - Pi
Dhcp stringName - The name of the DHCP Service that will be prefixed by the DHCP identifier.
- Pi
Dhcp boolSnat Enabled - Indicates if SNAT will be enabled for the DHCP service. The default value is true.
- Pi
Dns stringServer - The DNS Server for the DHCP service.
- Timeouts
Pi
Dhcp Timeouts Args
- pi
Cloud StringInstance Id - The GUID of the service instance associated with an account.
- pi
Cidr String - The CIDR for the DHCP private network.
- pi
Cloud StringConnection Id - The Cloud Connection UUID to connect with the DHCP private network.
- pi
Dhcp StringId - (String) The unique identifier of the DHCP Server. The ID is composed of
<pi_cloud_instance_id>/<dhcp_id>
. - pi
Dhcp StringName - The name of the DHCP Service that will be prefixed by the DHCP identifier.
- pi
Dhcp BooleanSnat Enabled - Indicates if SNAT will be enabled for the DHCP service. The default value is true.
- pi
Dns StringServer - The DNS Server for the DHCP service.
- timeouts
Pi
Dhcp Timeouts
- pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- pi
Cidr string - The CIDR for the DHCP private network.
- pi
Cloud stringConnection Id - The Cloud Connection UUID to connect with the DHCP private network.
- pi
Dhcp stringId - (String) The unique identifier of the DHCP Server. The ID is composed of
<pi_cloud_instance_id>/<dhcp_id>
. - pi
Dhcp stringName - The name of the DHCP Service that will be prefixed by the DHCP identifier.
- pi
Dhcp booleanSnat Enabled - Indicates if SNAT will be enabled for the DHCP service. The default value is true.
- pi
Dns stringServer - The DNS Server for the DHCP service.
- timeouts
Pi
Dhcp Timeouts
- pi_
cloud_ strinstance_ id - The GUID of the service instance associated with an account.
- pi_
cidr str - The CIDR for the DHCP private network.
- pi_
cloud_ strconnection_ id - The Cloud Connection UUID to connect with the DHCP private network.
- pi_
dhcp_ strid - (String) The unique identifier of the DHCP Server. The ID is composed of
<pi_cloud_instance_id>/<dhcp_id>
. - pi_
dhcp_ strname - The name of the DHCP Service that will be prefixed by the DHCP identifier.
- pi_
dhcp_ boolsnat_ enabled - Indicates if SNAT will be enabled for the DHCP service. The default value is true.
- pi_
dns_ strserver - The DNS Server for the DHCP service.
- timeouts
Pi
Dhcp Timeouts Args
- pi
Cloud StringInstance Id - The GUID of the service instance associated with an account.
- pi
Cidr String - The CIDR for the DHCP private network.
- pi
Cloud StringConnection Id - The Cloud Connection UUID to connect with the DHCP private network.
- pi
Dhcp StringId - (String) The unique identifier of the DHCP Server. The ID is composed of
<pi_cloud_instance_id>/<dhcp_id>
. - pi
Dhcp StringName - The name of the DHCP Service that will be prefixed by the DHCP identifier.
- pi
Dhcp BooleanSnat Enabled - Indicates if SNAT will be enabled for the DHCP service. The default value is true.
- pi
Dns StringServer - 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:
- Dhcp
Id string - (String) The ID of the DHCP Server.
- Id string
- The provider-assigned unique ID for this managed resource.
- Leases
List<Pi
Dhcp Lease> - (List) The list of DHCP Server PVM Instance leases.
Nested scheme for
leases
: - Network
Id string - (String) The ID of the DHCP Server private network.
- Network
Name string - The name of the DHCP Server private network.
- Status string
- (String) The status of the DHCP Server.
- Dhcp
Id string - (String) The ID of the DHCP Server.
- Id string
- The provider-assigned unique ID for this managed resource.
- Leases
[]Pi
Dhcp Lease - (List) The list of DHCP Server PVM Instance leases.
Nested scheme for
leases
: - Network
Id string - (String) The ID of the DHCP Server private network.
- Network
Name string - The name of the DHCP Server private network.
- Status string
- (String) The status of the DHCP Server.
- dhcp
Id String - (String) The ID of the DHCP Server.
- id String
- The provider-assigned unique ID for this managed resource.
- leases
List<Pi
Dhcp Lease> - (List) The list of DHCP Server PVM Instance leases.
Nested scheme for
leases
: - network
Id String - (String) The ID of the DHCP Server private network.
- network
Name String - The name of the DHCP Server private network.
- status String
- (String) The status of the DHCP Server.
- dhcp
Id string - (String) The ID of the DHCP Server.
- id string
- The provider-assigned unique ID for this managed resource.
- leases
Pi
Dhcp Lease[] - (List) The list of DHCP Server PVM Instance leases.
Nested scheme for
leases
: - network
Id string - (String) The ID of the DHCP Server private network.
- network
Name 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[Pi
Dhcp Lease] - (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.
- dhcp
Id 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
: - network
Id String - (String) The ID of the DHCP Server private network.
- network
Name 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.
- Dhcp
Id string - (String) The ID of the DHCP Server.
- Leases
List<Pi
Dhcp Lease> - (List) The list of DHCP Server PVM Instance leases.
Nested scheme for
leases
: - Network
Id string - (String) The ID of the DHCP Server private network.
- Network
Name string - The name of the DHCP Server private network.
- Pi
Cidr string - The CIDR for the DHCP private network.
- Pi
Cloud stringConnection Id - The Cloud Connection UUID to connect with the DHCP private network.
- Pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- Pi
Dhcp stringId - (String) The unique identifier of the DHCP Server. The ID is composed of
<pi_cloud_instance_id>/<dhcp_id>
. - Pi
Dhcp stringName - The name of the DHCP Service that will be prefixed by the DHCP identifier.
- Pi
Dhcp boolSnat Enabled - Indicates if SNAT will be enabled for the DHCP service. The default value is true.
- Pi
Dns stringServer - The DNS Server for the DHCP service.
- Status string
- (String) The status of the DHCP Server.
- Timeouts
Pi
Dhcp Timeouts
- Dhcp
Id string - (String) The ID of the DHCP Server.
- Leases
[]Pi
Dhcp Lease Args - (List) The list of DHCP Server PVM Instance leases.
Nested scheme for
leases
: - Network
Id string - (String) The ID of the DHCP Server private network.
- Network
Name string - The name of the DHCP Server private network.
- Pi
Cidr string - The CIDR for the DHCP private network.
- Pi
Cloud stringConnection Id - The Cloud Connection UUID to connect with the DHCP private network.
- Pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- Pi
Dhcp stringId - (String) The unique identifier of the DHCP Server. The ID is composed of
<pi_cloud_instance_id>/<dhcp_id>
. - Pi
Dhcp stringName - The name of the DHCP Service that will be prefixed by the DHCP identifier.
- Pi
Dhcp boolSnat Enabled - Indicates if SNAT will be enabled for the DHCP service. The default value is true.
- Pi
Dns stringServer - The DNS Server for the DHCP service.
- Status string
- (String) The status of the DHCP Server.
- Timeouts
Pi
Dhcp Timeouts Args
- dhcp
Id String - (String) The ID of the DHCP Server.
- leases
List<Pi
Dhcp Lease> - (List) The list of DHCP Server PVM Instance leases.
Nested scheme for
leases
: - network
Id String - (String) The ID of the DHCP Server private network.
- network
Name String - The name of the DHCP Server private network.
- pi
Cidr String - The CIDR for the DHCP private network.
- pi
Cloud StringConnection Id - The Cloud Connection UUID to connect with the DHCP private network.
- pi
Cloud StringInstance Id - The GUID of the service instance associated with an account.
- pi
Dhcp StringId - (String) The unique identifier of the DHCP Server. The ID is composed of
<pi_cloud_instance_id>/<dhcp_id>
. - pi
Dhcp StringName - The name of the DHCP Service that will be prefixed by the DHCP identifier.
- pi
Dhcp BooleanSnat Enabled - Indicates if SNAT will be enabled for the DHCP service. The default value is true.
- pi
Dns StringServer - The DNS Server for the DHCP service.
- status String
- (String) The status of the DHCP Server.
- timeouts
Pi
Dhcp Timeouts
- dhcp
Id string - (String) The ID of the DHCP Server.
- leases
Pi
Dhcp Lease[] - (List) The list of DHCP Server PVM Instance leases.
Nested scheme for
leases
: - network
Id string - (String) The ID of the DHCP Server private network.
- network
Name string - The name of the DHCP Server private network.
- pi
Cidr string - The CIDR for the DHCP private network.
- pi
Cloud stringConnection Id - The Cloud Connection UUID to connect with the DHCP private network.
- pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- pi
Dhcp stringId - (String) The unique identifier of the DHCP Server. The ID is composed of
<pi_cloud_instance_id>/<dhcp_id>
. - pi
Dhcp stringName - The name of the DHCP Service that will be prefixed by the DHCP identifier.
- pi
Dhcp booleanSnat Enabled - Indicates if SNAT will be enabled for the DHCP service. The default value is true.
- pi
Dns stringServer - The DNS Server for the DHCP service.
- status string
- (String) The status of the DHCP Server.
- timeouts
Pi
Dhcp Timeouts
- dhcp_
id str - (String) The ID of the DHCP Server.
- leases
Sequence[Pi
Dhcp Lease Args] - (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_ strconnection_ id - The Cloud Connection UUID to connect with the DHCP private network.
- pi_
cloud_ strinstance_ id - The GUID of the service instance associated with an account.
- pi_
dhcp_ strid - (String) The unique identifier of the DHCP Server. The ID is composed of
<pi_cloud_instance_id>/<dhcp_id>
. - pi_
dhcp_ strname - The name of the DHCP Service that will be prefixed by the DHCP identifier.
- pi_
dhcp_ boolsnat_ enabled - Indicates if SNAT will be enabled for the DHCP service. The default value is true.
- pi_
dns_ strserver - The DNS Server for the DHCP service.
- status str
- (String) The status of the DHCP Server.
- timeouts
Pi
Dhcp Timeouts Args
- dhcp
Id 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
: - network
Id String - (String) The ID of the DHCP Server private network.
- network
Name String - The name of the DHCP Server private network.
- pi
Cidr String - The CIDR for the DHCP private network.
- pi
Cloud StringConnection Id - The Cloud Connection UUID to connect with the DHCP private network.
- pi
Cloud StringInstance Id - The GUID of the service instance associated with an account.
- pi
Dhcp StringId - (String) The unique identifier of the DHCP Server. The ID is composed of
<pi_cloud_instance_id>/<dhcp_id>
. - pi
Dhcp StringName - The name of the DHCP Service that will be prefixed by the DHCP identifier.
- pi
Dhcp BooleanSnat Enabled - Indicates if SNAT will be enabled for the DHCP service. The default value is true.
- pi
Dns StringServer - The DNS Server for the DHCP service.
- status String
- (String) The status of the DHCP Server.
- timeouts Property Map
Supporting Types
PiDhcpLease, PiDhcpLeaseArgs
- Instance
Ip string - (String) The IP of the PVM Instance.
- Instance
Mac string - (String) The MAC Address of the PVM Instance.
- Instance
Ip string - (String) The IP of the PVM Instance.
- Instance
Mac string - (String) The MAC Address of the PVM Instance.
- instance
Ip String - (String) The IP of the PVM Instance.
- instance
Mac String - (String) The MAC Address of the PVM Instance.
- instance
Ip string - (String) The IP of the PVM Instance.
- instance
Mac 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.
- instance
Ip String - (String) The IP of the PVM Instance.
- instance
Mac String - (String) The MAC Address of the PVM Instance.
PiDhcpTimeouts, PiDhcpTimeoutsArgs
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.