1. Packages
  2. DNSimple
  3. API Docs
  4. ZoneRecord
DNSimple v3.4.2 published on Thursday, Mar 21, 2024 by Pulumi

dnsimple.ZoneRecord

Explore with Pulumi AI

dnsimple logo
DNSimple v3.4.2 published on Thursday, Mar 21, 2024 by Pulumi

    Provides a DNSimple zone record resource.

    Deprecation warning

    You can still use the deprecated dnsimple.Record configuration, but be aware that it will be removed in the upcoming 1.0.0 release.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as dnsimple from "@pulumi/dnsimple";
    
    // Add a record to the root domain
    const foobar = new dnsimple.ZoneRecord("foobar", {
        name: "",
        ttl: "3600",
        type: "A",
        value: "192.168.0.11",
        zoneName: _var.dnsimple_domain,
    });
    
    import pulumi
    import pulumi_dnsimple as dnsimple
    
    # Add a record to the root domain
    foobar = dnsimple.ZoneRecord("foobar",
        name="",
        ttl="3600",
        type="A",
        value="192.168.0.11",
        zone_name=var["dnsimple_domain"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-dnsimple/sdk/v3/go/dnsimple"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Add a record to the root domain
    		_, err := dnsimple.NewZoneRecord(ctx, "foobar", &dnsimple.ZoneRecordArgs{
    			Name:     pulumi.String(""),
    			Ttl:      pulumi.String("3600"),
    			Type:     pulumi.String("A"),
    			Value:    pulumi.String("192.168.0.11"),
    			ZoneName: pulumi.Any(_var.Dnsimple_domain),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DNSimple = Pulumi.DNSimple;
    
    return await Deployment.RunAsync(() => 
    {
        // Add a record to the root domain
        var foobar = new DNSimple.ZoneRecord("foobar", new()
        {
            Name = "",
            Ttl = "3600",
            Type = "A",
            Value = "192.168.0.11",
            ZoneName = @var.Dnsimple_domain,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.dnsimple.ZoneRecord;
    import com.pulumi.dnsimple.ZoneRecordArgs;
    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 foobar = new ZoneRecord("foobar", ZoneRecordArgs.builder()        
                .name("")
                .ttl(3600)
                .type("A")
                .value("192.168.0.11")
                .zoneName(var_.dnsimple_domain())
                .build());
    
        }
    }
    
    resources:
      # Add a record to the root domain
      foobar:
        type: dnsimple:ZoneRecord
        properties:
          name:
          ttl: 3600
          type: A
          value: 192.168.0.11
          zoneName: ${var.dnsimple_domain}
    
    import * as pulumi from "@pulumi/pulumi";
    import * as dnsimple from "@pulumi/dnsimple";
    
    // Add a record to a sub-domain
    const foobar = new dnsimple.ZoneRecord("foobar", {
        name: "terraform",
        ttl: "3600",
        type: "A",
        value: "192.168.0.11",
        zoneName: _var.dnsimple_domain,
    });
    
    import pulumi
    import pulumi_dnsimple as dnsimple
    
    # Add a record to a sub-domain
    foobar = dnsimple.ZoneRecord("foobar",
        name="terraform",
        ttl="3600",
        type="A",
        value="192.168.0.11",
        zone_name=var["dnsimple_domain"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-dnsimple/sdk/v3/go/dnsimple"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Add a record to a sub-domain
    		_, err := dnsimple.NewZoneRecord(ctx, "foobar", &dnsimple.ZoneRecordArgs{
    			Name:     pulumi.String("terraform"),
    			Ttl:      pulumi.String("3600"),
    			Type:     pulumi.String("A"),
    			Value:    pulumi.String("192.168.0.11"),
    			ZoneName: pulumi.Any(_var.Dnsimple_domain),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DNSimple = Pulumi.DNSimple;
    
    return await Deployment.RunAsync(() => 
    {
        // Add a record to a sub-domain
        var foobar = new DNSimple.ZoneRecord("foobar", new()
        {
            Name = "terraform",
            Ttl = "3600",
            Type = "A",
            Value = "192.168.0.11",
            ZoneName = @var.Dnsimple_domain,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.dnsimple.ZoneRecord;
    import com.pulumi.dnsimple.ZoneRecordArgs;
    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 foobar = new ZoneRecord("foobar", ZoneRecordArgs.builder()        
                .name("terraform")
                .ttl(3600)
                .type("A")
                .value("192.168.0.11")
                .zoneName(var_.dnsimple_domain())
                .build());
    
        }
    }
    
    resources:
      # Add a record to a sub-domain
      foobar:
        type: dnsimple:ZoneRecord
        properties:
          name: terraform
          ttl: 3600
          type: A
          value: 192.168.0.11
          zoneName: ${var.dnsimple_domain}
    

    Create ZoneRecord Resource

    new ZoneRecord(name: string, args: ZoneRecordArgs, opts?: CustomResourceOptions);
    @overload
    def ZoneRecord(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   name: Optional[str] = None,
                   priority: Optional[str] = None,
                   ttl: Optional[str] = None,
                   type: Optional[str] = None,
                   value: Optional[str] = None,
                   zone_name: Optional[str] = None)
    @overload
    def ZoneRecord(resource_name: str,
                   args: ZoneRecordArgs,
                   opts: Optional[ResourceOptions] = None)
    func NewZoneRecord(ctx *Context, name string, args ZoneRecordArgs, opts ...ResourceOption) (*ZoneRecord, error)
    public ZoneRecord(string name, ZoneRecordArgs args, CustomResourceOptions? opts = null)
    public ZoneRecord(String name, ZoneRecordArgs args)
    public ZoneRecord(String name, ZoneRecordArgs args, CustomResourceOptions options)
    
    type: dnsimple:ZoneRecord
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ZoneRecordArgs
    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 ZoneRecordArgs
    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 ZoneRecordArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ZoneRecordArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ZoneRecordArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    ZoneRecord 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 ZoneRecord resource accepts the following input properties:

    Name string
    The name of the record
    Type string
    The type of the record
    Value string
    The value of the record
    ZoneName string
    The domain to add the record to
    Priority string
    The priority of the record - only useful for some record types
    Ttl string
    The TTL of the record
    Name string
    The name of the record
    Type string
    The type of the record
    Value string
    The value of the record
    ZoneName string
    The domain to add the record to
    Priority string
    The priority of the record - only useful for some record types
    Ttl string
    The TTL of the record
    name String
    The name of the record
    type String
    The type of the record
    value String
    The value of the record
    zoneName String
    The domain to add the record to
    priority String
    The priority of the record - only useful for some record types
    ttl String
    The TTL of the record
    name string
    The name of the record
    type string
    The type of the record
    value string
    The value of the record
    zoneName string
    The domain to add the record to
    priority string
    The priority of the record - only useful for some record types
    ttl string
    The TTL of the record
    name str
    The name of the record
    type str
    The type of the record
    value str
    The value of the record
    zone_name str
    The domain to add the record to
    priority str
    The priority of the record - only useful for some record types
    ttl str
    The TTL of the record
    name String
    The name of the record
    type String
    The type of the record
    value String
    The value of the record
    zoneName String
    The domain to add the record to
    priority String
    The priority of the record - only useful for some record types
    ttl String
    The TTL of the record

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    QualifiedName string
    The FQDN of the record
    ZoneId string
    The domain ID of the record
    Id string
    The provider-assigned unique ID for this managed resource.
    QualifiedName string
    The FQDN of the record
    ZoneId string
    The domain ID of the record
    id String
    The provider-assigned unique ID for this managed resource.
    qualifiedName String
    The FQDN of the record
    zoneId String
    The domain ID of the record
    id string
    The provider-assigned unique ID for this managed resource.
    qualifiedName string
    The FQDN of the record
    zoneId string
    The domain ID of the record
    id str
    The provider-assigned unique ID for this managed resource.
    qualified_name str
    The FQDN of the record
    zone_id str
    The domain ID of the record
    id String
    The provider-assigned unique ID for this managed resource.
    qualifiedName String
    The FQDN of the record
    zoneId String
    The domain ID of the record

    Look up Existing ZoneRecord Resource

    Get an existing ZoneRecord 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?: ZoneRecordState, opts?: CustomResourceOptions): ZoneRecord
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            name: Optional[str] = None,
            priority: Optional[str] = None,
            qualified_name: Optional[str] = None,
            ttl: Optional[str] = None,
            type: Optional[str] = None,
            value: Optional[str] = None,
            zone_id: Optional[str] = None,
            zone_name: Optional[str] = None) -> ZoneRecord
    func GetZoneRecord(ctx *Context, name string, id IDInput, state *ZoneRecordState, opts ...ResourceOption) (*ZoneRecord, error)
    public static ZoneRecord Get(string name, Input<string> id, ZoneRecordState? state, CustomResourceOptions? opts = null)
    public static ZoneRecord get(String name, Output<String> id, ZoneRecordState 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:
    Name string
    The name of the record
    Priority string
    The priority of the record - only useful for some record types
    QualifiedName string
    The FQDN of the record
    Ttl string
    The TTL of the record
    Type string
    The type of the record
    Value string
    The value of the record
    ZoneId string
    The domain ID of the record
    ZoneName string
    The domain to add the record to
    Name string
    The name of the record
    Priority string
    The priority of the record - only useful for some record types
    QualifiedName string
    The FQDN of the record
    Ttl string
    The TTL of the record
    Type string
    The type of the record
    Value string
    The value of the record
    ZoneId string
    The domain ID of the record
    ZoneName string
    The domain to add the record to
    name String
    The name of the record
    priority String
    The priority of the record - only useful for some record types
    qualifiedName String
    The FQDN of the record
    ttl String
    The TTL of the record
    type String
    The type of the record
    value String
    The value of the record
    zoneId String
    The domain ID of the record
    zoneName String
    The domain to add the record to
    name string
    The name of the record
    priority string
    The priority of the record - only useful for some record types
    qualifiedName string
    The FQDN of the record
    ttl string
    The TTL of the record
    type string
    The type of the record
    value string
    The value of the record
    zoneId string
    The domain ID of the record
    zoneName string
    The domain to add the record to
    name str
    The name of the record
    priority str
    The priority of the record - only useful for some record types
    qualified_name str
    The FQDN of the record
    ttl str
    The TTL of the record
    type str
    The type of the record
    value str
    The value of the record
    zone_id str
    The domain ID of the record
    zone_name str
    The domain to add the record to
    name String
    The name of the record
    priority String
    The priority of the record - only useful for some record types
    qualifiedName String
    The FQDN of the record
    ttl String
    The TTL of the record
    type String
    The type of the record
    value String
    The value of the record
    zoneId String
    The domain ID of the record
    zoneName String
    The domain to add the record to

    Import

    DNSimple resources can be imported using their parent zone name (domain name) and numeric record ID.

    Importing record example.com with record ID 1234

    $ pulumi import dnsimple:index/zoneRecord:ZoneRecord resource_name example.com_1234
    

    Importing record www.example.com with record ID 1234

    $ pulumi import dnsimple:index/zoneRecord:ZoneRecord resource_name example.com_1234
    

    The record ID can be found in the URL when editing a record on the DNSimple web dashboard.

    Package Details

    Repository
    DNSimple pulumi/pulumi-dnsimple
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the dnsimple Terraform Provider.
    dnsimple logo
    DNSimple v3.4.2 published on Thursday, Mar 21, 2024 by Pulumi