get Geographical Location
Deprecated
azure.trafficmanager.getGeographicalLocation has been deprecated in favor of azure.network.getTrafficManager
Use this data source to access the ID of a specified Traffic Manager Geographical Location within the Geographical Hierarchy.
Example Usage
World)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.network.getTrafficManager({
name: "World",
});
export const locationCode = example.then(example => example.id);import pulumi
import pulumi_azure as azure
example = azure.network.get_traffic_manager(name="World")
pulumi.export("locationCode", example.id)using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.Network.GetTrafficManager.Invoke(new()
{
Name = "World",
});
return new Dictionary<string, object?>
{
["locationCode"] = example.Apply(getTrafficManagerResult => getTrafficManagerResult.Id),
};
});package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := network.GetTrafficManager(ctx, &network.GetTrafficManagerArgs{
Name: "World",
}, nil)
if err != nil {
return err
}
ctx.Export("locationCode", example.Id)
return nil
})
}package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.network.NetworkFunctions;
import com.pulumi.azure.network.inputs.GetTrafficManagerArgs;
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 = NetworkFunctions.getTrafficManager(GetTrafficManagerArgs.builder()
.name("World")
.build());
ctx.export("locationCode", example.applyValue(getTrafficManagerResult -> getTrafficManagerResult.id()));
}
}variables:
example:
fn::invoke:
Function: azure:network:getTrafficManager
Arguments:
name: World
outputs:
locationCode: ${example.id}Return
A collection of values returned by getGeographicalLocation.
Parameters
A collection of arguments for invoking getGeographicalLocation.
Deprecated
azure.trafficmanager.getGeographicalLocation has been deprecated in favor of azure.network.getTrafficManager
Return
A collection of values returned by getGeographicalLocation.
Parameters
Specifies the name of the Location, for example World, Europe or Germany.
See also
Deprecated
azure.trafficmanager.getGeographicalLocation has been deprecated in favor of azure.network.getTrafficManager
Return
A collection of values returned by getGeographicalLocation.
Parameters
Builder for com.pulumi.azure.trafficmanager.kotlin.inputs.GetGeographicalLocationPlainArgs.