The Automation API is now available. No CLI. No human-in-the-loop. Just your code. Learn More

DnsDomainRecord

Provides a Civo dns domain record resource.

Example Usage

using Pulumi;
using Civo = Pulumi.Civo;

class MyStack : Stack
{
    public MyStack()
    {
        // Create a new domain record
        var www = new Civo.DnsDomainRecord("www", new Civo.DnsDomainRecordArgs
        {
            DomainId = civo_dns_domain_name.Main.Id,
            Type = "A",
            Value = civo_instance.Foo.Public_ip,
            Ttl = 600,
        }, new CustomResourceOptions
        {
            DependsOn = 
            {
                civo_dns_domain_name.Main,
                civo_instance.Foo,
            },
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-civo/sdk/go/civo"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := civo.NewDnsDomainRecord(ctx, "www", &civo.DnsDomainRecordArgs{
            DomainId: pulumi.Any(civo_dns_domain_name.Main.Id),
            Type:     pulumi.String("A"),
            Value:    pulumi.Any(civo_instance.Foo.Public_ip),
            Ttl:      pulumi.Int(600),
        }, pulumi.DependsOn([]pulumi.Resource{
            civo_dns_domain_name.Main,
            civo_instance.Foo,
        }))
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_civo as civo

# Create a new domain record
www = civo.DnsDomainRecord("www",
    domain_id=civo_dns_domain_name["main"]["id"],
    type="A",
    value=civo_instance["foo"]["public_ip"],
    ttl=600,
    opts=ResourceOptions(depends_on=[
            civo_dns_domain_name["main"],
            civo_instance["foo"],
        ]))
import * as pulumi from "@pulumi/pulumi";
import * as civo from "@pulumi/civo";

// Create a new domain record
const www = new civo.DnsDomainRecord("www", {
    domainId: civo_dns_domain_name.main.id,
    type: "A",
    value: civo_instance.foo.public_ip,
    ttl: 600,
}, {
    dependsOn: [
        civo_dns_domain_name.main,
        civo_instance.foo,
    ],
});

Create a DnsDomainRecord Resource

def DnsDomainRecord(resource_name: str, opts: Optional[ResourceOptions] = None, domain_id: Optional[str] = None, name: Optional[str] = None, priority: Optional[int] = None, ttl: Optional[int] = None, type: Optional[str] = None, value: Optional[str] = None)
name string
The unique name of the resource.
args DnsDomainRecordArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args DnsDomainRecordArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DnsDomainRecordArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

DnsDomainRecord Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The DnsDomainRecord resource accepts the following input properties:

DomainId string

The id of the domain

Ttl int

How long caching DNS servers should cache this record for, in seconds (the minimum is 600 and the default if unspecified is 600)

Type string

The choice of record type from A, CNAME, MX, SRV or TXT

Value string

The IP address (A or MX), hostname (CNAME or MX) or text value (TXT) to serve for this record

Name string

The portion before the domain name (e.g. www) or an @ for the apex/root domain (you cannot use an A record with an amex/root domain)

Priority int

Useful for MX records only, the priority mail should be attempted it (defaults to 10)

DomainId string

The id of the domain

Ttl int

How long caching DNS servers should cache this record for, in seconds (the minimum is 600 and the default if unspecified is 600)

Type string

The choice of record type from A, CNAME, MX, SRV or TXT

Value string

The IP address (A or MX), hostname (CNAME or MX) or text value (TXT) to serve for this record

Name string

The portion before the domain name (e.g. www) or an @ for the apex/root domain (you cannot use an A record with an amex/root domain)

Priority int

Useful for MX records only, the priority mail should be attempted it (defaults to 10)

domainId string

The id of the domain

ttl number

How long caching DNS servers should cache this record for, in seconds (the minimum is 600 and the default if unspecified is 600)

type string

The choice of record type from A, CNAME, MX, SRV or TXT

value string

The IP address (A or MX), hostname (CNAME or MX) or text value (TXT) to serve for this record

name string

The portion before the domain name (e.g. www) or an @ for the apex/root domain (you cannot use an A record with an amex/root domain)

priority number

Useful for MX records only, the priority mail should be attempted it (defaults to 10)

domain_id str

The id of the domain

ttl int

How long caching DNS servers should cache this record for, in seconds (the minimum is 600 and the default if unspecified is 600)

type str

The choice of record type from A, CNAME, MX, SRV or TXT

value str

The IP address (A or MX), hostname (CNAME or MX) or text value (TXT) to serve for this record

name str

The portion before the domain name (e.g. www) or an @ for the apex/root domain (you cannot use an A record with an amex/root domain)

priority int

Useful for MX records only, the priority mail should be attempted it (defaults to 10)

Outputs

All input properties are implicitly available as output properties. Additionally, the DnsDomainRecord resource produces the following output properties:

AccountId string

The id account of the domain

CreatedAt string

The date when it was created in UTC format

Id string
The provider-assigned unique ID for this managed resource.
UpdatedAt string

The date when it was updated in UTC format

AccountId string

The id account of the domain

CreatedAt string

The date when it was created in UTC format

Id string
The provider-assigned unique ID for this managed resource.
UpdatedAt string

The date when it was updated in UTC format

accountId string

The id account of the domain

createdAt string

The date when it was created in UTC format

id string
The provider-assigned unique ID for this managed resource.
updatedAt string

The date when it was updated in UTC format

account_id str

The id account of the domain

created_at str

The date when it was created in UTC format

id str
The provider-assigned unique ID for this managed resource.
updated_at str

The date when it was updated in UTC format

Look up an Existing DnsDomainRecord Resource

Get an existing DnsDomainRecord resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: DnsDomainRecordState, opts?: CustomResourceOptions): DnsDomainRecord
@staticmethod
def get(resource_name: str, id: str, opts: Optional[ResourceOptions] = None, account_id: Optional[str] = None, created_at: Optional[str] = None, domain_id: Optional[str] = None, name: Optional[str] = None, priority: Optional[int] = None, ttl: Optional[int] = None, type: Optional[str] = None, updated_at: Optional[str] = None, value: Optional[str] = None) -> DnsDomainRecord
func GetDnsDomainRecord(ctx *Context, name string, id IDInput, state *DnsDomainRecordState, opts ...ResourceOption) (*DnsDomainRecord, error)
public static DnsDomainRecord Get(string name, Input<string> id, DnsDomainRecordState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

AccountId string

The id account of the domain

CreatedAt string

The date when it was created in UTC format

DomainId string

The id of the domain

Name string

The portion before the domain name (e.g. www) or an @ for the apex/root domain (you cannot use an A record with an amex/root domain)

Priority int

Useful for MX records only, the priority mail should be attempted it (defaults to 10)

Ttl int

How long caching DNS servers should cache this record for, in seconds (the minimum is 600 and the default if unspecified is 600)

Type string

The choice of record type from A, CNAME, MX, SRV or TXT

UpdatedAt string

The date when it was updated in UTC format

Value string

The IP address (A or MX), hostname (CNAME or MX) or text value (TXT) to serve for this record

AccountId string

The id account of the domain

CreatedAt string

The date when it was created in UTC format

DomainId string

The id of the domain

Name string

The portion before the domain name (e.g. www) or an @ for the apex/root domain (you cannot use an A record with an amex/root domain)

Priority int

Useful for MX records only, the priority mail should be attempted it (defaults to 10)

Ttl int

How long caching DNS servers should cache this record for, in seconds (the minimum is 600 and the default if unspecified is 600)

Type string

The choice of record type from A, CNAME, MX, SRV or TXT

UpdatedAt string

The date when it was updated in UTC format

Value string

The IP address (A or MX), hostname (CNAME or MX) or text value (TXT) to serve for this record

accountId string

The id account of the domain

createdAt string

The date when it was created in UTC format

domainId string

The id of the domain

name string

The portion before the domain name (e.g. www) or an @ for the apex/root domain (you cannot use an A record with an amex/root domain)

priority number

Useful for MX records only, the priority mail should be attempted it (defaults to 10)

ttl number

How long caching DNS servers should cache this record for, in seconds (the minimum is 600 and the default if unspecified is 600)

type string

The choice of record type from A, CNAME, MX, SRV or TXT

updatedAt string

The date when it was updated in UTC format

value string

The IP address (A or MX), hostname (CNAME or MX) or text value (TXT) to serve for this record

account_id str

The id account of the domain

created_at str

The date when it was created in UTC format

domain_id str

The id of the domain

name str

The portion before the domain name (e.g. www) or an @ for the apex/root domain (you cannot use an A record with an amex/root domain)

priority int

Useful for MX records only, the priority mail should be attempted it (defaults to 10)

ttl int

How long caching DNS servers should cache this record for, in seconds (the minimum is 600 and the default if unspecified is 600)

type str

The choice of record type from A, CNAME, MX, SRV or TXT

updated_at str

The date when it was updated in UTC format

value str

The IP address (A or MX), hostname (CNAME or MX) or text value (TXT) to serve for this record

Package Details

Repository
https://github.com/pulumi/pulumi-civo
License
Apache-2.0
Notes
This Pulumi package is based on the civo Terraform Provider.