Exoscale v0.59.0 published on Monday, May 20, 2024 by Pulumiverse
exoscale.getDomain
Explore with Pulumi AI
Fetch Exoscale DNS Domains data.
Corresponding resource: exoscale_domain.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as exoscale from "@pulumi/exoscale";
const myDomain = exoscale.getDomain({
name: "my.domain",
});
export const myDomainId = myDomain.then(myDomain => myDomain.id);
import pulumi
import pulumi_exoscale as exoscale
my_domain = exoscale.get_domain(name="my.domain")
pulumi.export("myDomainId", my_domain.id)
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-exoscale/sdk/go/exoscale"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
myDomain, err := exoscale.LookupDomain(ctx, &exoscale.LookupDomainArgs{
Name: "my.domain",
}, nil)
if err != nil {
return err
}
ctx.Export("myDomainId", myDomain.Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Exoscale = Pulumi.Exoscale;
return await Deployment.RunAsync(() =>
{
var myDomain = Exoscale.GetDomain.Invoke(new()
{
Name = "my.domain",
});
return new Dictionary<string, object?>
{
["myDomainId"] = myDomain.Apply(getDomainResult => getDomainResult.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.exoscale.ExoscaleFunctions;
import com.pulumi.exoscale.inputs.GetDomainArgs;
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 myDomain = ExoscaleFunctions.getDomain(GetDomainArgs.builder()
.name("my.domain")
.build());
ctx.export("myDomainId", myDomain.applyValue(getDomainResult -> getDomainResult.id()));
}
}
variables:
myDomain:
fn::invoke:
Function: exoscale:getDomain
Arguments:
name: my.domain
outputs:
myDomainId: ${myDomain.id}
Please refer to the examples directory for complete configuration examples.
Using getDomain
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 getDomain(args: GetDomainArgs, opts?: InvokeOptions): Promise<GetDomainResult>
function getDomainOutput(args: GetDomainOutputArgs, opts?: InvokeOptions): Output<GetDomainResult>
def get_domain(name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDomainResult
def get_domain_output(name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDomainResult]
func LookupDomain(ctx *Context, args *LookupDomainArgs, opts ...InvokeOption) (*LookupDomainResult, error)
func LookupDomainOutput(ctx *Context, args *LookupDomainOutputArgs, opts ...InvokeOption) LookupDomainResultOutput
> Note: This function is named LookupDomain
in the Go SDK.
public static class GetDomain
{
public static Task<GetDomainResult> InvokeAsync(GetDomainArgs args, InvokeOptions? opts = null)
public static Output<GetDomainResult> Invoke(GetDomainInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDomainResult> getDomain(GetDomainArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: exoscale:index/getDomain:getDomain
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
- The DNS domain name to match.
- Name string
- The DNS domain name to match.
- name String
- The DNS domain name to match.
- name string
- The DNS domain name to match.
- name str
- The DNS domain name to match.
- name String
- The DNS domain name to match.
getDomain Result
The following output properties are available:
Package Details
- Repository
- exoscale pulumiverse/pulumi-exoscale
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
exoscale
Terraform Provider.