"use strict";
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPublicIPOutput = exports.getPublicIP = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Use this data source to access information about an existing Public IP Address.
 *
 * ## Example Usage
 *
 * ### Reference An Existing)
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 *
 * const example = azure.network.getPublicIP({
 *     name: "name_of_public_ip",
 *     resourceGroupName: "name_of_resource_group",
 * });
 * export const domainNameLabel = example.then(example => example.domainNameLabel);
 * export const publicIpAddress = example.then(example => example.ipAddress);
 * ```
 *
 * ### Retrieve The Dynamic Public IP Of A New VM)
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 *
 * const exampleResourceGroup = new azure.core.ResourceGroup("example", {
 *     name: "test-resources",
 *     location: "West Europe",
 * });
 * const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
 *     name: "test-network",
 *     addressSpaces: ["10.0.0.0/16"],
 *     location: exampleResourceGroup.location,
 *     resourceGroupName: exampleResourceGroup.name,
 * });
 * const exampleSubnet = new azure.network.Subnet("example", {
 *     name: "acctsub",
 *     resourceGroupName: exampleResourceGroup.name,
 *     virtualNetworkName: exampleVirtualNetwork.name,
 *     addressPrefixes: ["10.0.2.0/24"],
 * });
 * const examplePublicIp = new azure.network.PublicIp("example", {
 *     name: "test-pip",
 *     location: exampleResourceGroup.location,
 *     resourceGroupName: exampleResourceGroup.name,
 *     allocationMethod: "Dynamic",
 *     idleTimeoutInMinutes: 30,
 *     tags: {
 *         environment: "test",
 *     },
 * });
 * const exampleNetworkInterface = new azure.network.NetworkInterface("example", {
 *     name: "test-nic",
 *     location: exampleResourceGroup.location,
 *     resourceGroupName: exampleResourceGroup.name,
 *     ipConfigurations: [{
 *         name: "testconfiguration1",
 *         subnetId: exampleSubnet.id,
 *         privateIpAddressAllocation: "Static",
 *         privateIpAddress: "10.0.2.5",
 *         publicIpAddressId: examplePublicIp.id,
 *     }],
 * });
 * const exampleVirtualMachine = new azure.compute.VirtualMachine("example", {
 *     name: "test-vm",
 *     location: exampleResourceGroup.location,
 *     resourceGroupName: exampleResourceGroup.name,
 *     networkInterfaceIds: [exampleNetworkInterface.id],
 * });
 * const example = azure.network.getPublicIPOutput({
 *     name: examplePublicIp.name,
 *     resourceGroupName: exampleVirtualMachine.resourceGroupName,
 * });
 * export const publicIpAddress = example.apply(example => example.ipAddress);
 * ```
 *
 * ## API Providers
 *
 * <!-- This section is generated, changes will be overwritten -->
 * This data source uses the following Azure API Providers:
 *
 * * `Microsoft.Network` - 2025-01-01
 */
function getPublicIP(args, opts) {
    opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
    return pulumi.runtime.invoke("azure:network/getPublicIP:getPublicIP", {
        "name": args.name,
        "resourceGroupName": args.resourceGroupName,
    }, opts);
}
exports.getPublicIP = getPublicIP;
/**
 * Use this data source to access information about an existing Public IP Address.
 *
 * ## Example Usage
 *
 * ### Reference An Existing)
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 *
 * const example = azure.network.getPublicIP({
 *     name: "name_of_public_ip",
 *     resourceGroupName: "name_of_resource_group",
 * });
 * export const domainNameLabel = example.then(example => example.domainNameLabel);
 * export const publicIpAddress = example.then(example => example.ipAddress);
 * ```
 *
 * ### Retrieve The Dynamic Public IP Of A New VM)
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 *
 * const exampleResourceGroup = new azure.core.ResourceGroup("example", {
 *     name: "test-resources",
 *     location: "West Europe",
 * });
 * const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
 *     name: "test-network",
 *     addressSpaces: ["10.0.0.0/16"],
 *     location: exampleResourceGroup.location,
 *     resourceGroupName: exampleResourceGroup.name,
 * });
 * const exampleSubnet = new azure.network.Subnet("example", {
 *     name: "acctsub",
 *     resourceGroupName: exampleResourceGroup.name,
 *     virtualNetworkName: exampleVirtualNetwork.name,
 *     addressPrefixes: ["10.0.2.0/24"],
 * });
 * const examplePublicIp = new azure.network.PublicIp("example", {
 *     name: "test-pip",
 *     location: exampleResourceGroup.location,
 *     resourceGroupName: exampleResourceGroup.name,
 *     allocationMethod: "Dynamic",
 *     idleTimeoutInMinutes: 30,
 *     tags: {
 *         environment: "test",
 *     },
 * });
 * const exampleNetworkInterface = new azure.network.NetworkInterface("example", {
 *     name: "test-nic",
 *     location: exampleResourceGroup.location,
 *     resourceGroupName: exampleResourceGroup.name,
 *     ipConfigurations: [{
 *         name: "testconfiguration1",
 *         subnetId: exampleSubnet.id,
 *         privateIpAddressAllocation: "Static",
 *         privateIpAddress: "10.0.2.5",
 *         publicIpAddressId: examplePublicIp.id,
 *     }],
 * });
 * const exampleVirtualMachine = new azure.compute.VirtualMachine("example", {
 *     name: "test-vm",
 *     location: exampleResourceGroup.location,
 *     resourceGroupName: exampleResourceGroup.name,
 *     networkInterfaceIds: [exampleNetworkInterface.id],
 * });
 * const example = azure.network.getPublicIPOutput({
 *     name: examplePublicIp.name,
 *     resourceGroupName: exampleVirtualMachine.resourceGroupName,
 * });
 * export const publicIpAddress = example.apply(example => example.ipAddress);
 * ```
 *
 * ## API Providers
 *
 * <!-- This section is generated, changes will be overwritten -->
 * This data source uses the following Azure API Providers:
 *
 * * `Microsoft.Network` - 2025-01-01
 */
function getPublicIPOutput(args, opts) {
    opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
    return pulumi.runtime.invokeOutput("azure:network/getPublicIP:getPublicIP", {
        "name": args.name,
        "resourceGroupName": args.resourceGroupName,
    }, opts);
}
exports.getPublicIPOutput = getPublicIPOutput;
//# sourceMappingURL=getPublicIP.js.map