GetRecord
Get information on a DNS record. This data source provides the name, TTL, and zone file as configured on your DigitalOcean account. This is useful if the record in question is not managed by this provider.
An error is triggered if the provided domain name or record are not managed with your DigitalOcean account.
Example Usage
using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(DigitalOcean.GetRecord.InvokeAsync(new DigitalOcean.GetRecordArgs
{
Domain = "example.com",
Name = "test",
}));
this.RecordType = example.Apply(example => example.Type);
this.RecordTtl = example.Apply(example => example.Ttl);
}
[Output("recordType")]
public Output<string> RecordType { get; set; }
[Output("recordTtl")]
public Output<string> RecordTtl { get; set; }
}
Coming soon!
import pulumi
import pulumi_digitalocean as digitalocean
example = digitalocean.get_record(domain="example.com",
name="test")
pulumi.export("recordType", example.type)
pulumi.export("recordTtl", example.ttl)import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
const example = digitalocean.getRecord({
domain: "example.com",
name: "test",
});
export const recordType = example.then(example => example.type);
export const recordTtl = example.then(example => example.ttl);Using GetRecord
function getRecord(args: GetRecordArgs, opts?: InvokeOptions): Promise<GetRecordResult>function get_record(domain=None, name=None, opts=None)func GetRecord(ctx *Context, args *GetRecordArgs, opts ...InvokeOption) (*GetRecordResult, error)public static class GetRecord {
public static Task<GetRecordResult> InvokeAsync(GetRecordArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
GetRecord Result
The following output properties are available:
Package Details
- Repository
- https://github.com/pulumi/pulumi-digitalocean
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
digitaloceanTerraform Provider.