getCustomLocation

Use this data source to access information about an existing Custom Location within an Extended Location.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.extendedlocation.getCustomLocation({
name: exampleAzurermExtendedLocationCustomLocation.name,
resourceGroupName: exampleAzurermResourceGroup.name,
});
export const customLocationId = example.then(example => example.id);
import pulumi
import pulumi_azure as azure
example = azure.extendedlocation.get_custom_location(name=example_azurerm_extended_location_custom_location["name"],
resource_group_name=example_azurerm_resource_group["name"])
pulumi.export("customLocationId", example.id)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.ExtendedLocation.GetCustomLocation.Invoke(new()
{
Name = exampleAzurermExtendedLocationCustomLocation.Name,
ResourceGroupName = exampleAzurermResourceGroup.Name,
});
return new Dictionary<string, object?>
{
["customLocationId"] = example.Apply(getCustomLocationResult => getCustomLocationResult.Id),
};
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/extendedlocation"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := extendedlocation.LookupCustomLocation(ctx, &extendedlocation.LookupCustomLocationArgs{
Name: exampleAzurermExtendedLocationCustomLocation.Name,
ResourceGroupName: exampleAzurermResourceGroup.Name,
}, nil)
if err != nil {
return err
}
ctx.Export("customLocationId", example.Id)
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.extendedlocation.ExtendedlocationFunctions;
import com.pulumi.azure.extendedlocation.inputs.GetCustomLocationArgs;
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) {
final var example = ExtendedlocationFunctions.getCustomLocation(GetCustomLocationArgs.builder()
.name(exampleAzurermExtendedLocationCustomLocation.name())
.resourceGroupName(exampleAzurermResourceGroup.name())
.build());
ctx.export("customLocationId", example.applyValue(getCustomLocationResult -> getCustomLocationResult.id()));
}
}
variables:
example:
fn::invoke:
function: azure:extendedlocation:getCustomLocation
arguments:
name: ${exampleAzurermExtendedLocationCustomLocation.name}
resourceGroupName: ${exampleAzurermResourceGroup.name}
outputs:
customLocationId: ${example.id}

Return

A collection of values returned by getCustomLocation.

Parameters

argument

A collection of arguments for invoking getCustomLocation.


suspend fun getCustomLocation(name: String, resourceGroupName: String): GetCustomLocationResult

Return

A collection of values returned by getCustomLocation.

Parameters

name

The name of the Custom Location.

resourceGroupName

The name of the Resource Group where the Custom Location exists.

See also


Return

A collection of values returned by getCustomLocation.

Parameters

argument

Builder for com.pulumi.azure.extendedlocation.kotlin.inputs.GetCustomLocationPlainArgs.

See also