1. Packages
  2. Exoscale
  3. API Docs
  4. DomainRecord
Exoscale v0.56.0 published on Sunday, Mar 3, 2024 by Pulumiverse

exoscale.DomainRecord

Explore with Pulumi AI

exoscale logo
Exoscale v0.56.0 published on Sunday, Mar 3, 2024 by Pulumiverse

    Manage Exoscale DNS Domain Records.

    Corresponding data source: exoscale_domain_record.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Exoscale = Pulumiverse.Exoscale;
    
    return await Deployment.RunAsync(() => 
    {
        var myDomain = new Exoscale.Domain("myDomain");
    
        var myHost = new Exoscale.DomainRecord("myHost", new()
        {
            Domain = myDomain.Id,
            RecordType = "A",
            Content = "1.2.3.4",
        });
    
        var myHostAlias = new Exoscale.DomainRecord("myHostAlias", new()
        {
            Domain = myDomain.Id,
            RecordType = "CNAME",
            Content = myHost.Hostname,
        });
    
    });
    
    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.NewDomain(ctx, "myDomain", nil)
    		if err != nil {
    			return err
    		}
    		myHost, err := exoscale.NewDomainRecord(ctx, "myHost", &exoscale.DomainRecordArgs{
    			Domain:     myDomain.ID(),
    			RecordType: pulumi.String("A"),
    			Content:    pulumi.String("1.2.3.4"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = exoscale.NewDomainRecord(ctx, "myHostAlias", &exoscale.DomainRecordArgs{
    			Domain:     myDomain.ID(),
    			RecordType: pulumi.String("CNAME"),
    			Content:    myHost.Hostname,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.exoscale.Domain;
    import com.pulumi.exoscale.DomainRecord;
    import com.pulumi.exoscale.DomainRecordArgs;
    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) {
            var myDomain = new Domain("myDomain");
    
            var myHost = new DomainRecord("myHost", DomainRecordArgs.builder()        
                .domain(myDomain.id())
                .recordType("A")
                .content("1.2.3.4")
                .build());
    
            var myHostAlias = new DomainRecord("myHostAlias", DomainRecordArgs.builder()        
                .domain(myDomain.id())
                .recordType("CNAME")
                .content(myHost.hostname())
                .build());
    
        }
    }
    
    import pulumi
    import pulumiverse_exoscale as exoscale
    
    my_domain = exoscale.Domain("myDomain")
    my_host = exoscale.DomainRecord("myHost",
        domain=my_domain.id,
        record_type="A",
        content="1.2.3.4")
    my_host_alias = exoscale.DomainRecord("myHostAlias",
        domain=my_domain.id,
        record_type="CNAME",
        content=my_host.hostname)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as exoscale from "@pulumiverse/exoscale";
    
    const myDomain = new exoscale.Domain("myDomain", {});
    const myHost = new exoscale.DomainRecord("myHost", {
        domain: myDomain.id,
        recordType: "A",
        content: "1.2.3.4",
    });
    const myHostAlias = new exoscale.DomainRecord("myHostAlias", {
        domain: myDomain.id,
        recordType: "CNAME",
        content: myHost.hostname,
    });
    
    resources:
      myDomain:
        type: exoscale:Domain
      myHost:
        type: exoscale:DomainRecord
        properties:
          domain: ${myDomain.id}
          recordType: A
          content: 1.2.3.4
      myHostAlias:
        type: exoscale:DomainRecord
        properties:
          domain: ${myDomain.id}
          recordType: CNAME
          content: ${myHost.hostname}
    

    Create DomainRecord Resource

    new DomainRecord(name: string, args: DomainRecordArgs, opts?: CustomResourceOptions);
    @overload
    def DomainRecord(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     content: Optional[str] = None,
                     domain: Optional[str] = None,
                     name: Optional[str] = None,
                     prio: Optional[int] = None,
                     record_type: Optional[str] = None,
                     ttl: Optional[int] = None)
    @overload
    def DomainRecord(resource_name: str,
                     args: DomainRecordArgs,
                     opts: Optional[ResourceOptions] = None)
    func NewDomainRecord(ctx *Context, name string, args DomainRecordArgs, opts ...ResourceOption) (*DomainRecord, error)
    public DomainRecord(string name, DomainRecordArgs args, CustomResourceOptions? opts = null)
    public DomainRecord(String name, DomainRecordArgs args)
    public DomainRecord(String name, DomainRecordArgs args, CustomResourceOptions options)
    
    type: exoscale:DomainRecord
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args DomainRecordArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args DomainRecordArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args DomainRecordArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DomainRecordArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DomainRecordArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    DomainRecord Resource Properties

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

    Inputs

    The DomainRecord resource accepts the following input properties:

    Content string
    The record value.
    Domain string
    ❗ The parent exoscale.Domain to attach the record to.
    RecordType string
    ❗ The record type (A, AAAA, ALIAS, CAA, CNAME, HINFO, MX, NAPTR, NS, POOL, SPF, SRV, SSHFP, TXT, URL).
    Name string
    The record name, Leave blank ("") to create a root record (similar to using @ in a DNS zone file).
    Prio int
    The record priority (for types that support it; minimum 0).
    Ttl int
    The record TTL (seconds; minimum 0; default: 3600).
    Content string
    The record value.
    Domain string
    ❗ The parent exoscale.Domain to attach the record to.
    RecordType string
    ❗ The record type (A, AAAA, ALIAS, CAA, CNAME, HINFO, MX, NAPTR, NS, POOL, SPF, SRV, SSHFP, TXT, URL).
    Name string
    The record name, Leave blank ("") to create a root record (similar to using @ in a DNS zone file).
    Prio int
    The record priority (for types that support it; minimum 0).
    Ttl int
    The record TTL (seconds; minimum 0; default: 3600).
    content String
    The record value.
    domain String
    ❗ The parent exoscale.Domain to attach the record to.
    recordType String
    ❗ The record type (A, AAAA, ALIAS, CAA, CNAME, HINFO, MX, NAPTR, NS, POOL, SPF, SRV, SSHFP, TXT, URL).
    name String
    The record name, Leave blank ("") to create a root record (similar to using @ in a DNS zone file).
    prio Integer
    The record priority (for types that support it; minimum 0).
    ttl Integer
    The record TTL (seconds; minimum 0; default: 3600).
    content string
    The record value.
    domain string
    ❗ The parent exoscale.Domain to attach the record to.
    recordType string
    ❗ The record type (A, AAAA, ALIAS, CAA, CNAME, HINFO, MX, NAPTR, NS, POOL, SPF, SRV, SSHFP, TXT, URL).
    name string
    The record name, Leave blank ("") to create a root record (similar to using @ in a DNS zone file).
    prio number
    The record priority (for types that support it; minimum 0).
    ttl number
    The record TTL (seconds; minimum 0; default: 3600).
    content str
    The record value.
    domain str
    ❗ The parent exoscale.Domain to attach the record to.
    record_type str
    ❗ The record type (A, AAAA, ALIAS, CAA, CNAME, HINFO, MX, NAPTR, NS, POOL, SPF, SRV, SSHFP, TXT, URL).
    name str
    The record name, Leave blank ("") to create a root record (similar to using @ in a DNS zone file).
    prio int
    The record priority (for types that support it; minimum 0).
    ttl int
    The record TTL (seconds; minimum 0; default: 3600).
    content String
    The record value.
    domain String
    ❗ The parent exoscale.Domain to attach the record to.
    recordType String
    ❗ The record type (A, AAAA, ALIAS, CAA, CNAME, HINFO, MX, NAPTR, NS, POOL, SPF, SRV, SSHFP, TXT, URL).
    name String
    The record name, Leave blank ("") to create a root record (similar to using @ in a DNS zone file).
    prio Number
    The record priority (for types that support it; minimum 0).
    ttl Number
    The record TTL (seconds; minimum 0; default: 3600).

    Outputs

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

    ContentNormalized string
    The normalized value of the record
    Hostname string
    The record Fully Qualified Domain Name (FQDN). Useful for aliasing A/AAAA records with CNAME.
    Id string
    The provider-assigned unique ID for this managed resource.
    ContentNormalized string
    The normalized value of the record
    Hostname string
    The record Fully Qualified Domain Name (FQDN). Useful for aliasing A/AAAA records with CNAME.
    Id string
    The provider-assigned unique ID for this managed resource.
    contentNormalized String
    The normalized value of the record
    hostname String
    The record Fully Qualified Domain Name (FQDN). Useful for aliasing A/AAAA records with CNAME.
    id String
    The provider-assigned unique ID for this managed resource.
    contentNormalized string
    The normalized value of the record
    hostname string
    The record Fully Qualified Domain Name (FQDN). Useful for aliasing A/AAAA records with CNAME.
    id string
    The provider-assigned unique ID for this managed resource.
    content_normalized str
    The normalized value of the record
    hostname str
    The record Fully Qualified Domain Name (FQDN). Useful for aliasing A/AAAA records with CNAME.
    id str
    The provider-assigned unique ID for this managed resource.
    contentNormalized String
    The normalized value of the record
    hostname String
    The record Fully Qualified Domain Name (FQDN). Useful for aliasing A/AAAA records with CNAME.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing DomainRecord Resource

    Get an existing DomainRecord 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?: DomainRecordState, opts?: CustomResourceOptions): DomainRecord
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            content: Optional[str] = None,
            content_normalized: Optional[str] = None,
            domain: Optional[str] = None,
            hostname: Optional[str] = None,
            name: Optional[str] = None,
            prio: Optional[int] = None,
            record_type: Optional[str] = None,
            ttl: Optional[int] = None) -> DomainRecord
    func GetDomainRecord(ctx *Context, name string, id IDInput, state *DomainRecordState, opts ...ResourceOption) (*DomainRecord, error)
    public static DomainRecord Get(string name, Input<string> id, DomainRecordState? state, CustomResourceOptions? opts = null)
    public static DomainRecord get(String name, Output<String> id, DomainRecordState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    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:
    Content string
    The record value.
    ContentNormalized string
    The normalized value of the record
    Domain string
    ❗ The parent exoscale.Domain to attach the record to.
    Hostname string
    The record Fully Qualified Domain Name (FQDN). Useful for aliasing A/AAAA records with CNAME.
    Name string
    The record name, Leave blank ("") to create a root record (similar to using @ in a DNS zone file).
    Prio int
    The record priority (for types that support it; minimum 0).
    RecordType string
    ❗ The record type (A, AAAA, ALIAS, CAA, CNAME, HINFO, MX, NAPTR, NS, POOL, SPF, SRV, SSHFP, TXT, URL).
    Ttl int
    The record TTL (seconds; minimum 0; default: 3600).
    Content string
    The record value.
    ContentNormalized string
    The normalized value of the record
    Domain string
    ❗ The parent exoscale.Domain to attach the record to.
    Hostname string
    The record Fully Qualified Domain Name (FQDN). Useful for aliasing A/AAAA records with CNAME.
    Name string
    The record name, Leave blank ("") to create a root record (similar to using @ in a DNS zone file).
    Prio int
    The record priority (for types that support it; minimum 0).
    RecordType string
    ❗ The record type (A, AAAA, ALIAS, CAA, CNAME, HINFO, MX, NAPTR, NS, POOL, SPF, SRV, SSHFP, TXT, URL).
    Ttl int
    The record TTL (seconds; minimum 0; default: 3600).
    content String
    The record value.
    contentNormalized String
    The normalized value of the record
    domain String
    ❗ The parent exoscale.Domain to attach the record to.
    hostname String
    The record Fully Qualified Domain Name (FQDN). Useful for aliasing A/AAAA records with CNAME.
    name String
    The record name, Leave blank ("") to create a root record (similar to using @ in a DNS zone file).
    prio Integer
    The record priority (for types that support it; minimum 0).
    recordType String
    ❗ The record type (A, AAAA, ALIAS, CAA, CNAME, HINFO, MX, NAPTR, NS, POOL, SPF, SRV, SSHFP, TXT, URL).
    ttl Integer
    The record TTL (seconds; minimum 0; default: 3600).
    content string
    The record value.
    contentNormalized string
    The normalized value of the record
    domain string
    ❗ The parent exoscale.Domain to attach the record to.
    hostname string
    The record Fully Qualified Domain Name (FQDN). Useful for aliasing A/AAAA records with CNAME.
    name string
    The record name, Leave blank ("") to create a root record (similar to using @ in a DNS zone file).
    prio number
    The record priority (for types that support it; minimum 0).
    recordType string
    ❗ The record type (A, AAAA, ALIAS, CAA, CNAME, HINFO, MX, NAPTR, NS, POOL, SPF, SRV, SSHFP, TXT, URL).
    ttl number
    The record TTL (seconds; minimum 0; default: 3600).
    content str
    The record value.
    content_normalized str
    The normalized value of the record
    domain str
    ❗ The parent exoscale.Domain to attach the record to.
    hostname str
    The record Fully Qualified Domain Name (FQDN). Useful for aliasing A/AAAA records with CNAME.
    name str
    The record name, Leave blank ("") to create a root record (similar to using @ in a DNS zone file).
    prio int
    The record priority (for types that support it; minimum 0).
    record_type str
    ❗ The record type (A, AAAA, ALIAS, CAA, CNAME, HINFO, MX, NAPTR, NS, POOL, SPF, SRV, SSHFP, TXT, URL).
    ttl int
    The record TTL (seconds; minimum 0; default: 3600).
    content String
    The record value.
    contentNormalized String
    The normalized value of the record
    domain String
    ❗ The parent exoscale.Domain to attach the record to.
    hostname String
    The record Fully Qualified Domain Name (FQDN). Useful for aliasing A/AAAA records with CNAME.
    name String
    The record name, Leave blank ("") to create a root record (similar to using @ in a DNS zone file).
    prio Number
    The record priority (for types that support it; minimum 0).
    recordType String
    ❗ The record type (A, AAAA, ALIAS, CAA, CNAME, HINFO, MX, NAPTR, NS, POOL, SPF, SRV, SSHFP, TXT, URL).
    ttl Number
    The record TTL (seconds; minimum 0; default: 3600).

    Import

    An existing DNS domain record may be imported by <ID>:

    $ pulumi import exoscale:index/domainRecord:DomainRecord \
    

    exoscale_domain_record.my_host \

    f81d4fae-7dec-11d0-a765-00a0c91e6bf6

    Package Details

    Repository
    exoscale pulumiverse/pulumi-exoscale
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the exoscale Terraform Provider.
    exoscale logo
    Exoscale v0.56.0 published on Sunday, Mar 3, 2024 by Pulumiverse