ionoscloud.getLocation
Explore with Pulumi AI
The Location data source can be used to search for and return an existing location which can then be used elsewhere in the configuration. If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned. When this happens, please refine your search string so that it is specific enough to return only one result.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@pulumi/ionoscloud";
const example = ionoscloud.getLocation({
feature: "SSD",
name: "karlsruhe",
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.get_location(feature="SSD",
name="karlsruhe")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ionoscloud/v6/ionoscloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ionoscloud.GetLocation(ctx, &ionoscloud.GetLocationArgs{
Feature: pulumi.StringRef("SSD"),
Name: pulumi.StringRef("karlsruhe"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Pulumi.Ionoscloud;
return await Deployment.RunAsync(() =>
{
var example = Ionoscloud.GetLocation.Invoke(new()
{
Feature = "SSD",
Name = "karlsruhe",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.IonoscloudFunctions;
import com.pulumi.ionoscloud.inputs.GetLocationArgs;
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 = IonoscloudFunctions.getLocation(GetLocationArgs.builder()
.feature("SSD")
.name("karlsruhe")
.build());
}
}
variables:
example:
fn::invoke:
function: ionoscloud:getLocation
arguments:
feature: SSD
name: karlsruhe
Using getLocation
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getLocation(args: GetLocationArgs, opts?: InvokeOptions): Promise<GetLocationResult>
function getLocationOutput(args: GetLocationOutputArgs, opts?: InvokeOptions): Output<GetLocationResult>
def get_location(feature: Optional[str] = None,
id: Optional[str] = None,
name: Optional[str] = None,
timeouts: Optional[GetLocationTimeouts] = None,
opts: Optional[InvokeOptions] = None) -> GetLocationResult
def get_location_output(feature: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
timeouts: Optional[pulumi.Input[GetLocationTimeoutsArgs]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetLocationResult]
func GetLocation(ctx *Context, args *GetLocationArgs, opts ...InvokeOption) (*GetLocationResult, error)
func GetLocationOutput(ctx *Context, args *GetLocationOutputArgs, opts ...InvokeOption) GetLocationResultOutput
> Note: This function is named GetLocation
in the Go SDK.
public static class GetLocation
{
public static Task<GetLocationResult> InvokeAsync(GetLocationArgs args, InvokeOptions? opts = null)
public static Output<GetLocationResult> Invoke(GetLocationInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetLocationResult> getLocation(GetLocationArgs args, InvokeOptions options)
public static Output<GetLocationResult> getLocation(GetLocationArgs args, InvokeOptions options)
fn::invoke:
function: ionoscloud:index/getLocation:getLocation
arguments:
# arguments dictionary
The following arguments are supported:
- Feature string
- A desired feature that the location must be able to provide.
- Id string
- UUID of the location
- Name string
- Name of the location to search for.
- Timeouts
Get
Location Timeouts
- Feature string
- A desired feature that the location must be able to provide.
- Id string
- UUID of the location
- Name string
- Name of the location to search for.
- Timeouts
Get
Location Timeouts
- feature String
- A desired feature that the location must be able to provide.
- id String
- UUID of the location
- name String
- Name of the location to search for.
- timeouts
Get
Location Timeouts
- feature string
- A desired feature that the location must be able to provide.
- id string
- UUID of the location
- name string
- Name of the location to search for.
- timeouts
Get
Location Timeouts
- feature str
- A desired feature that the location must be able to provide.
- id str
- UUID of the location
- name str
- Name of the location to search for.
- timeouts
Get
Location Timeouts
- feature String
- A desired feature that the location must be able to provide.
- id String
- UUID of the location
- name String
- Name of the location to search for.
- timeouts Property Map
getLocation Result
The following output properties are available:
- Cpu
Architectures List<GetLocation Cpu Architecture> - Array of features and CPU families available in a location
- Feature string
- Id string
- UUID of the location
- Image
Aliases List<string> - List of image aliases available for the location
- Name string
- Timeouts
Get
Location Timeouts
- Cpu
Architectures []GetLocation Cpu Architecture - Array of features and CPU families available in a location
- Feature string
- Id string
- UUID of the location
- Image
Aliases []string - List of image aliases available for the location
- Name string
- Timeouts
Get
Location Timeouts
- cpu
Architectures List<GetLocation Cpu Architecture> - Array of features and CPU families available in a location
- feature String
- id String
- UUID of the location
- image
Aliases List<String> - List of image aliases available for the location
- name String
- timeouts
Get
Location Timeouts
- cpu
Architectures GetLocation Cpu Architecture[] - Array of features and CPU families available in a location
- feature string
- id string
- UUID of the location
- image
Aliases string[] - List of image aliases available for the location
- name string
- timeouts
Get
Location Timeouts
- cpu_
architectures Sequence[GetLocation Cpu Architecture] - Array of features and CPU families available in a location
- feature str
- id str
- UUID of the location
- image_
aliases Sequence[str] - List of image aliases available for the location
- name str
- timeouts
Get
Location Timeouts
- cpu
Architectures List<Property Map> - Array of features and CPU families available in a location
- feature String
- id String
- UUID of the location
- image
Aliases List<String> - List of image aliases available for the location
- name String
- timeouts Property Map
Supporting Types
GetLocationCpuArchitecture
- cpu_
family str - A valid CPU family name.
- max_
cores float - The maximum number of cores available.
- max_
ram float - The maximum number of RAM in MB.
- vendor str
- A valid CPU vendor name.
GetLocationTimeouts
Package Details
- Repository
- ionoscloud ionos-cloud/terraform-provider-ionoscloud
- License
- Notes
- This Pulumi package is based on the
ionoscloud
Terraform Provider.