import * as pulumi from "@pulumi/pulumi"; /** * This resource provides the Public Ip resource in Oracle Cloud Infrastructure Core service. * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/iaas/latest/PublicIp * * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/ * * Creates a public IP. Use the `lifetime` property to specify whether it's an ephemeral or * reserved public IP. For information about limits on how many you can create, see * [Public IP Addresses](https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingpublicIPs.htm). * * * **For an ephemeral public IP assigned to a private IP:** You must also specify a `privateIpId` * with the [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary private IP you want to assign the public IP to. The public IP is * created in the same availability domain as the private IP. An ephemeral public IP must always be * assigned to a private IP, and only to the *primary* private IP on a VNIC, not a secondary * private IP. Exception: If you create a [NatGateway](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/NatGateway/), Oracle * automatically assigns the NAT gateway a regional ephemeral public IP that you cannot remove. * * * **For a reserved public IP:** You may also optionally assign the public IP to a private * IP by specifying `privateIpId`. Or you can later assign the public IP with * [UpdatePublicIp](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PublicIp/UpdatePublicIp). * * **Note:** When assigning a public IP to a private IP, the private IP must not already have * a public IP with `lifecycleState` = ASSIGNING or ASSIGNED. If it does, an error is returned. * * Also, for reserved public IPs, the optional assignment part of this operation is * asynchronous. Poll the public IP's `lifecycleState` to determine if the assignment * succeeded. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as oci from "@pulumi/oci"; * * const testPublicIp = new oci.core.PublicIp("test_public_ip", { * compartmentId: compartmentId, * lifetime: publicIpLifetime, * definedTags: { * "Operations.CostCenter": "42", * }, * displayName: publicIpDisplayName, * freeformTags: { * Department: "Finance", * }, * privateIpId: testPrivateIp.id, * publicIpPoolId: testPublicIpPool.id, * }); * ``` * * ## Import * * PublicIps can be imported using the `id`, e.g. * * ```sh * $ pulumi import oci:Core/publicIp:PublicIp test_public_ip "id" * ``` */ export declare class PublicIp extends pulumi.CustomResource { /** * Get an existing PublicIp resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: PublicIpState, opts?: pulumi.CustomResourceOptions): PublicIp; /** * Returns true if the given object is an instance of PublicIp. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is PublicIp; /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the entity the public IP is assigned to, or in the process of being assigned to. */ readonly assignedEntityId: pulumi.Output; /** * The type of entity the public IP is assigned to, or in the process of being assigned to. */ readonly assignedEntityType: pulumi.Output; /** * The public IP's availability domain. This property is set only for ephemeral public IPs that are assigned to a private IP (that is, when the `scope` of the public IP is set to AVAILABILITY_DOMAIN). The value is the availability domain of the assigned private IP. Example: `Uocm:PHX-AD-1` */ readonly availabilityDomain: pulumi.Output; /** * (Updatable) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to contain the public IP. For ephemeral public IPs, you must set this to the private IP's compartment [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). */ readonly compartmentId: pulumi.Output; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}` */ readonly definedTags: pulumi.Output<{ [key: string]: string; }>; /** * (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. */ readonly displayName: pulumi.Output; /** * (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` */ readonly freeformTags: pulumi.Output<{ [key: string]: string; }>; /** * The public IP address of the `publicIp` object. Example: `203.0.113.2` */ readonly ipAddress: pulumi.Output; /** * Defines when the public IP is deleted and released back to the Oracle Cloud Infrastructure public IP pool. For more information, see [Public IP Addresses](https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingpublicIPs.htm). */ readonly lifetime: pulumi.Output; /** * (Updatable) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private IP to assign the public IP to. * * Required for an ephemeral public IP because it must always be assigned to a private IP (specifically a *primary* private IP). * * Optional for a reserved public IP. If you don't provide it, the public IP is created but not assigned to a private IP. You can later assign the public IP with [UpdatePublicIp](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PublicIp/UpdatePublicIp). */ readonly privateIpId: pulumi.Output; /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the public IP pool. * * ** IMPORTANT ** * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values */ readonly publicIpPoolId: pulumi.Output; /** * Whether the public IP is regional or specific to a particular availability domain. * * `REGION`: The public IP exists within a region and is assigned to a regional entity (such as a [NatGateway](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/NatGateway/)), or can be assigned to a private IP in any availability domain in the region. Reserved public IPs and ephemeral public IPs assigned to a regional entity have `scope` = `REGION`. * * `AVAILABILITY_DOMAIN`: The public IP exists within the availability domain of the entity it's assigned to, which is specified by the `availabilityDomain` property of the public IP object. Ephemeral public IPs that are assigned to private IPs have `scope` = `AVAILABILITY_DOMAIN`. */ readonly scope: pulumi.Output; /** * The public IP's current state. */ readonly state: pulumi.Output; /** * The date and time the public IP was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). Example: `2016-08-25T21:10:29.600Z` */ readonly timeCreated: pulumi.Output; /** * Create a PublicIp resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: PublicIpArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering PublicIp resources. */ export interface PublicIpState { /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the entity the public IP is assigned to, or in the process of being assigned to. */ assignedEntityId?: pulumi.Input; /** * The type of entity the public IP is assigned to, or in the process of being assigned to. */ assignedEntityType?: pulumi.Input; /** * The public IP's availability domain. This property is set only for ephemeral public IPs that are assigned to a private IP (that is, when the `scope` of the public IP is set to AVAILABILITY_DOMAIN). The value is the availability domain of the assigned private IP. Example: `Uocm:PHX-AD-1` */ availabilityDomain?: pulumi.Input; /** * (Updatable) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to contain the public IP. For ephemeral public IPs, you must set this to the private IP's compartment [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). */ compartmentId?: pulumi.Input; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}` */ definedTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. */ displayName?: pulumi.Input; /** * (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` */ freeformTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * The public IP address of the `publicIp` object. Example: `203.0.113.2` */ ipAddress?: pulumi.Input; /** * Defines when the public IP is deleted and released back to the Oracle Cloud Infrastructure public IP pool. For more information, see [Public IP Addresses](https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingpublicIPs.htm). */ lifetime?: pulumi.Input; /** * (Updatable) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private IP to assign the public IP to. * * Required for an ephemeral public IP because it must always be assigned to a private IP (specifically a *primary* private IP). * * Optional for a reserved public IP. If you don't provide it, the public IP is created but not assigned to a private IP. You can later assign the public IP with [UpdatePublicIp](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PublicIp/UpdatePublicIp). */ privateIpId?: pulumi.Input; /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the public IP pool. * * ** IMPORTANT ** * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values */ publicIpPoolId?: pulumi.Input; /** * Whether the public IP is regional or specific to a particular availability domain. * * `REGION`: The public IP exists within a region and is assigned to a regional entity (such as a [NatGateway](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/NatGateway/)), or can be assigned to a private IP in any availability domain in the region. Reserved public IPs and ephemeral public IPs assigned to a regional entity have `scope` = `REGION`. * * `AVAILABILITY_DOMAIN`: The public IP exists within the availability domain of the entity it's assigned to, which is specified by the `availabilityDomain` property of the public IP object. Ephemeral public IPs that are assigned to private IPs have `scope` = `AVAILABILITY_DOMAIN`. */ scope?: pulumi.Input; /** * The public IP's current state. */ state?: pulumi.Input; /** * The date and time the public IP was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). Example: `2016-08-25T21:10:29.600Z` */ timeCreated?: pulumi.Input; } /** * The set of arguments for constructing a PublicIp resource. */ export interface PublicIpArgs { /** * (Updatable) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to contain the public IP. For ephemeral public IPs, you must set this to the private IP's compartment [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). */ compartmentId: pulumi.Input; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}` */ definedTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. */ displayName?: pulumi.Input; /** * (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` */ freeformTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Defines when the public IP is deleted and released back to the Oracle Cloud Infrastructure public IP pool. For more information, see [Public IP Addresses](https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingpublicIPs.htm). */ lifetime: pulumi.Input; /** * (Updatable) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private IP to assign the public IP to. * * Required for an ephemeral public IP because it must always be assigned to a private IP (specifically a *primary* private IP). * * Optional for a reserved public IP. If you don't provide it, the public IP is created but not assigned to a private IP. You can later assign the public IP with [UpdatePublicIp](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PublicIp/UpdatePublicIp). */ privateIpId?: pulumi.Input; /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the public IP pool. * * ** IMPORTANT ** * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values */ publicIpPoolId?: pulumi.Input; } //# sourceMappingURL=publicIp.d.ts.map