1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. Record
Cloudflare v5.42.0 published on Thursday, Oct 31, 2024 by Pulumi

cloudflare.Record

Explore with Pulumi AI

cloudflare logo
Cloudflare v5.42.0 published on Thursday, Oct 31, 2024 by Pulumi

    Provides a Cloudflare record resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    // Add a record to the domain
    const example = new cloudflare.Record("example", {
        zoneId: cloudflareZoneId,
        name: "terraform",
        content: "192.0.2.1",
        type: "A",
        ttl: 3600,
    });
    // Add a record requiring a data map
    const _sipTls = new cloudflare.Record("_sip_tls", {
        zoneId: cloudflareZoneId,
        name: "_sip._tls",
        type: "SRV",
        data: {
            service: "_sip",
            proto: "_tls",
            name: "terraform-srv",
            priority: 0,
            weight: 0,
            port: 443,
            target: "example.com",
        },
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    # Add a record to the domain
    example = cloudflare.Record("example",
        zone_id=cloudflare_zone_id,
        name="terraform",
        content="192.0.2.1",
        type="A",
        ttl=3600)
    # Add a record requiring a data map
    _sip_tls = cloudflare.Record("_sip_tls",
        zone_id=cloudflare_zone_id,
        name="_sip._tls",
        type="SRV",
        data={
            "service": "_sip",
            "proto": "_tls",
            "name": "terraform-srv",
            "priority": 0,
            "weight": 0,
            "port": 443,
            "target": "example.com",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Add a record to the domain
    		_, err := cloudflare.NewRecord(ctx, "example", &cloudflare.RecordArgs{
    			ZoneId:  pulumi.Any(cloudflareZoneId),
    			Name:    pulumi.String("terraform"),
    			Content: pulumi.String("192.0.2.1"),
    			Type:    pulumi.String("A"),
    			Ttl:     pulumi.Int(3600),
    		})
    		if err != nil {
    			return err
    		}
    		// Add a record requiring a data map
    		_, err = cloudflare.NewRecord(ctx, "_sip_tls", &cloudflare.RecordArgs{
    			ZoneId: pulumi.Any(cloudflareZoneId),
    			Name:   pulumi.String("_sip._tls"),
    			Type:   pulumi.String("SRV"),
    			Data: &cloudflare.RecordDataArgs{
    				Service:  pulumi.String("_sip"),
    				Proto:    pulumi.String("_tls"),
    				Name:     pulumi.String("terraform-srv"),
    				Priority: pulumi.Int(0),
    				Weight:   pulumi.Int(0),
    				Port:     pulumi.Int(443),
    				Target:   pulumi.String("example.com"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudflare = Pulumi.Cloudflare;
    
    return await Deployment.RunAsync(() => 
    {
        // Add a record to the domain
        var example = new Cloudflare.Record("example", new()
        {
            ZoneId = cloudflareZoneId,
            Name = "terraform",
            Content = "192.0.2.1",
            Type = "A",
            Ttl = 3600,
        });
    
        // Add a record requiring a data map
        var _sipTls = new Cloudflare.Record("_sip_tls", new()
        {
            ZoneId = cloudflareZoneId,
            Name = "_sip._tls",
            Type = "SRV",
            Data = new Cloudflare.Inputs.RecordDataArgs
            {
                Service = "_sip",
                Proto = "_tls",
                Name = "terraform-srv",
                Priority = 0,
                Weight = 0,
                Port = 443,
                Target = "example.com",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.Record;
    import com.pulumi.cloudflare.RecordArgs;
    import com.pulumi.cloudflare.inputs.RecordDataArgs;
    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) {
            // Add a record to the domain
            var example = new Record("example", RecordArgs.builder()
                .zoneId(cloudflareZoneId)
                .name("terraform")
                .content("192.0.2.1")
                .type("A")
                .ttl(3600)
                .build());
    
            // Add a record requiring a data map
            var _sipTls = new Record("_sipTls", RecordArgs.builder()
                .zoneId(cloudflareZoneId)
                .name("_sip._tls")
                .type("SRV")
                .data(RecordDataArgs.builder()
                    .service("_sip")
                    .proto("_tls")
                    .name("terraform-srv")
                    .priority(0)
                    .weight(0)
                    .port(443)
                    .target("example.com")
                    .build())
                .build());
    
        }
    }
    
    resources:
      # Add a record to the domain
      example:
        type: cloudflare:Record
        properties:
          zoneId: ${cloudflareZoneId}
          name: terraform
          content: 192.0.2.1
          type: A
          ttl: 3600
      # Add a record requiring a data map
      _sipTls:
        type: cloudflare:Record
        name: _sip_tls
        properties:
          zoneId: ${cloudflareZoneId}
          name: _sip._tls
          type: SRV
          data:
            service: _sip
            proto: _tls
            name: terraform-srv
            priority: 0
            weight: 0
            port: 443
            target: example.com
    

    Create Record Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Record(name: string, args: RecordArgs, opts?: CustomResourceOptions);
    @overload
    def Record(resource_name: str,
               args: RecordArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Record(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               name: Optional[str] = None,
               type: Optional[str] = None,
               zone_id: Optional[str] = None,
               allow_overwrite: Optional[bool] = None,
               comment: Optional[str] = None,
               content: Optional[str] = None,
               data: Optional[RecordDataArgs] = None,
               priority: Optional[int] = None,
               proxied: Optional[bool] = None,
               tags: Optional[Sequence[str]] = None,
               ttl: Optional[int] = None,
               value: Optional[str] = None)
    func NewRecord(ctx *Context, name string, args RecordArgs, opts ...ResourceOption) (*Record, error)
    public Record(string name, RecordArgs args, CustomResourceOptions? opts = null)
    public Record(String name, RecordArgs args)
    public Record(String name, RecordArgs args, CustomResourceOptions options)
    
    type: cloudflare:Record
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args RecordArgs
    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 RecordArgs
    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 RecordArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RecordArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RecordArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var recordResource = new Cloudflare.Record("recordResource", new()
    {
        Name = "string",
        Type = "string",
        ZoneId = "string",
        AllowOverwrite = false,
        Comment = "string",
        Content = "string",
        Data = new Cloudflare.Inputs.RecordDataArgs
        {
            Algorithm = 0,
            Altitude = 0,
            Certificate = "string",
            Content = "string",
            Digest = "string",
            DigestType = 0,
            Fingerprint = "string",
            Flags = "string",
            KeyTag = 0,
            LatDegrees = 0,
            LatDirection = "string",
            LatMinutes = 0,
            LatSeconds = 0,
            LongDegrees = 0,
            LongDirection = "string",
            LongMinutes = 0,
            LongSeconds = 0,
            MatchingType = 0,
            Name = "string",
            Order = 0,
            Port = 0,
            PrecisionHorz = 0,
            PrecisionVert = 0,
            Preference = 0,
            Priority = 0,
            Proto = "string",
            Protocol = 0,
            PublicKey = "string",
            Regex = "string",
            Replacement = "string",
            Selector = 0,
            Service = "string",
            Size = 0,
            Tag = "string",
            Target = "string",
            Type = 0,
            Usage = 0,
            Value = "string",
            Weight = 0,
        },
        Priority = 0,
        Proxied = false,
        Tags = new[]
        {
            "string",
        },
        Ttl = 0,
    });
    
    example, err := cloudflare.NewRecord(ctx, "recordResource", &cloudflare.RecordArgs{
    	Name:           pulumi.String("string"),
    	Type:           pulumi.String("string"),
    	ZoneId:         pulumi.String("string"),
    	AllowOverwrite: pulumi.Bool(false),
    	Comment:        pulumi.String("string"),
    	Content:        pulumi.String("string"),
    	Data: &cloudflare.RecordDataArgs{
    		Algorithm:     pulumi.Int(0),
    		Altitude:      pulumi.Float64(0),
    		Certificate:   pulumi.String("string"),
    		Content:       pulumi.String("string"),
    		Digest:        pulumi.String("string"),
    		DigestType:    pulumi.Int(0),
    		Fingerprint:   pulumi.String("string"),
    		Flags:         pulumi.String("string"),
    		KeyTag:        pulumi.Int(0),
    		LatDegrees:    pulumi.Int(0),
    		LatDirection:  pulumi.String("string"),
    		LatMinutes:    pulumi.Int(0),
    		LatSeconds:    pulumi.Float64(0),
    		LongDegrees:   pulumi.Int(0),
    		LongDirection: pulumi.String("string"),
    		LongMinutes:   pulumi.Int(0),
    		LongSeconds:   pulumi.Float64(0),
    		MatchingType:  pulumi.Int(0),
    		Name:          pulumi.String("string"),
    		Order:         pulumi.Int(0),
    		Port:          pulumi.Int(0),
    		PrecisionHorz: pulumi.Float64(0),
    		PrecisionVert: pulumi.Float64(0),
    		Preference:    pulumi.Int(0),
    		Priority:      pulumi.Int(0),
    		Proto:         pulumi.String("string"),
    		Protocol:      pulumi.Int(0),
    		PublicKey:     pulumi.String("string"),
    		Regex:         pulumi.String("string"),
    		Replacement:   pulumi.String("string"),
    		Selector:      pulumi.Int(0),
    		Service:       pulumi.String("string"),
    		Size:          pulumi.Float64(0),
    		Tag:           pulumi.String("string"),
    		Target:        pulumi.String("string"),
    		Type:          pulumi.Int(0),
    		Usage:         pulumi.Int(0),
    		Value:         pulumi.String("string"),
    		Weight:        pulumi.Int(0),
    	},
    	Priority: pulumi.Int(0),
    	Proxied:  pulumi.Bool(false),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Ttl: pulumi.Int(0),
    })
    
    var recordResource = new Record("recordResource", RecordArgs.builder()
        .name("string")
        .type("string")
        .zoneId("string")
        .allowOverwrite(false)
        .comment("string")
        .content("string")
        .data(RecordDataArgs.builder()
            .algorithm(0)
            .altitude(0)
            .certificate("string")
            .content("string")
            .digest("string")
            .digestType(0)
            .fingerprint("string")
            .flags("string")
            .keyTag(0)
            .latDegrees(0)
            .latDirection("string")
            .latMinutes(0)
            .latSeconds(0)
            .longDegrees(0)
            .longDirection("string")
            .longMinutes(0)
            .longSeconds(0)
            .matchingType(0)
            .name("string")
            .order(0)
            .port(0)
            .precisionHorz(0)
            .precisionVert(0)
            .preference(0)
            .priority(0)
            .proto("string")
            .protocol(0)
            .publicKey("string")
            .regex("string")
            .replacement("string")
            .selector(0)
            .service("string")
            .size(0)
            .tag("string")
            .target("string")
            .type(0)
            .usage(0)
            .value("string")
            .weight(0)
            .build())
        .priority(0)
        .proxied(false)
        .tags("string")
        .ttl(0)
        .build());
    
    record_resource = cloudflare.Record("recordResource",
        name="string",
        type="string",
        zone_id="string",
        allow_overwrite=False,
        comment="string",
        content="string",
        data={
            "algorithm": 0,
            "altitude": 0,
            "certificate": "string",
            "content": "string",
            "digest": "string",
            "digest_type": 0,
            "fingerprint": "string",
            "flags": "string",
            "key_tag": 0,
            "lat_degrees": 0,
            "lat_direction": "string",
            "lat_minutes": 0,
            "lat_seconds": 0,
            "long_degrees": 0,
            "long_direction": "string",
            "long_minutes": 0,
            "long_seconds": 0,
            "matching_type": 0,
            "name": "string",
            "order": 0,
            "port": 0,
            "precision_horz": 0,
            "precision_vert": 0,
            "preference": 0,
            "priority": 0,
            "proto": "string",
            "protocol": 0,
            "public_key": "string",
            "regex": "string",
            "replacement": "string",
            "selector": 0,
            "service": "string",
            "size": 0,
            "tag": "string",
            "target": "string",
            "type": 0,
            "usage": 0,
            "value": "string",
            "weight": 0,
        },
        priority=0,
        proxied=False,
        tags=["string"],
        ttl=0)
    
    const recordResource = new cloudflare.Record("recordResource", {
        name: "string",
        type: "string",
        zoneId: "string",
        allowOverwrite: false,
        comment: "string",
        content: "string",
        data: {
            algorithm: 0,
            altitude: 0,
            certificate: "string",
            content: "string",
            digest: "string",
            digestType: 0,
            fingerprint: "string",
            flags: "string",
            keyTag: 0,
            latDegrees: 0,
            latDirection: "string",
            latMinutes: 0,
            latSeconds: 0,
            longDegrees: 0,
            longDirection: "string",
            longMinutes: 0,
            longSeconds: 0,
            matchingType: 0,
            name: "string",
            order: 0,
            port: 0,
            precisionHorz: 0,
            precisionVert: 0,
            preference: 0,
            priority: 0,
            proto: "string",
            protocol: 0,
            publicKey: "string",
            regex: "string",
            replacement: "string",
            selector: 0,
            service: "string",
            size: 0,
            tag: "string",
            target: "string",
            type: 0,
            usage: 0,
            value: "string",
            weight: 0,
        },
        priority: 0,
        proxied: false,
        tags: ["string"],
        ttl: 0,
    });
    
    type: cloudflare:Record
    properties:
        allowOverwrite: false
        comment: string
        content: string
        data:
            algorithm: 0
            altitude: 0
            certificate: string
            content: string
            digest: string
            digestType: 0
            fingerprint: string
            flags: string
            keyTag: 0
            latDegrees: 0
            latDirection: string
            latMinutes: 0
            latSeconds: 0
            longDegrees: 0
            longDirection: string
            longMinutes: 0
            longSeconds: 0
            matchingType: 0
            name: string
            order: 0
            port: 0
            precisionHorz: 0
            precisionVert: 0
            preference: 0
            priority: 0
            proto: string
            protocol: 0
            publicKey: string
            regex: string
            replacement: string
            selector: 0
            service: string
            size: 0
            tag: string
            target: string
            type: 0
            usage: 0
            value: string
            weight: 0
        name: string
        priority: 0
        proxied: false
        tags:
            - string
        ttl: 0
        type: string
        zoneId: string
    

    Record Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Record resource accepts the following input properties:

    Name string
    The name of the record. Modifying this attribute will force creation of a new resource.
    Type string
    The type of the record. Available values: A, AAAA, CAA, CNAME, TXT, SRV, LOC, MX, NS, SPF, CERT, DNSKEY, DS, NAPTR, SMIMEA, SSHFP, TLSA, URI, PTR, HTTPS, SVCB. Modifying this attribute will force creation of a new resource.
    ZoneId string
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    AllowOverwrite bool
    Comment string
    Comments or notes about the DNS record. This field has no effect on DNS responses.
    Content string
    The content of the record. Must provide only one of data, content, value.
    Data RecordData
    Map of attributes that constitute the record value. Must provide only one of data, content, value.
    Priority int
    The priority of the record.
    Proxied bool
    Whether the record gets Cloudflare's origin protection.
    Tags List<string>
    Custom tags for the DNS record.
    Ttl int
    The TTL of the record.
    Value string
    The value of the record. Must provide only one of data, content, value.

    Deprecated: value is deprecated in favour of content and will be removed in the next major release.

    Name string
    The name of the record. Modifying this attribute will force creation of a new resource.
    Type string
    The type of the record. Available values: A, AAAA, CAA, CNAME, TXT, SRV, LOC, MX, NS, SPF, CERT, DNSKEY, DS, NAPTR, SMIMEA, SSHFP, TLSA, URI, PTR, HTTPS, SVCB. Modifying this attribute will force creation of a new resource.
    ZoneId string
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    AllowOverwrite bool
    Comment string
    Comments or notes about the DNS record. This field has no effect on DNS responses.
    Content string
    The content of the record. Must provide only one of data, content, value.
    Data RecordDataArgs
    Map of attributes that constitute the record value. Must provide only one of data, content, value.
    Priority int
    The priority of the record.
    Proxied bool
    Whether the record gets Cloudflare's origin protection.
    Tags []string
    Custom tags for the DNS record.
    Ttl int
    The TTL of the record.
    Value string
    The value of the record. Must provide only one of data, content, value.

    Deprecated: value is deprecated in favour of content and will be removed in the next major release.

    name String
    The name of the record. Modifying this attribute will force creation of a new resource.
    type String
    The type of the record. Available values: A, AAAA, CAA, CNAME, TXT, SRV, LOC, MX, NS, SPF, CERT, DNSKEY, DS, NAPTR, SMIMEA, SSHFP, TLSA, URI, PTR, HTTPS, SVCB. Modifying this attribute will force creation of a new resource.
    zoneId String
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    allowOverwrite Boolean
    comment String
    Comments or notes about the DNS record. This field has no effect on DNS responses.
    content String
    The content of the record. Must provide only one of data, content, value.
    data RecordData
    Map of attributes that constitute the record value. Must provide only one of data, content, value.
    priority Integer
    The priority of the record.
    proxied Boolean
    Whether the record gets Cloudflare's origin protection.
    tags List<String>
    Custom tags for the DNS record.
    ttl Integer
    The TTL of the record.
    value String
    The value of the record. Must provide only one of data, content, value.

    Deprecated: value is deprecated in favour of content and will be removed in the next major release.

    name string
    The name of the record. Modifying this attribute will force creation of a new resource.
    type string
    The type of the record. Available values: A, AAAA, CAA, CNAME, TXT, SRV, LOC, MX, NS, SPF, CERT, DNSKEY, DS, NAPTR, SMIMEA, SSHFP, TLSA, URI, PTR, HTTPS, SVCB. Modifying this attribute will force creation of a new resource.
    zoneId string
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    allowOverwrite boolean
    comment string
    Comments or notes about the DNS record. This field has no effect on DNS responses.
    content string
    The content of the record. Must provide only one of data, content, value.
    data RecordData
    Map of attributes that constitute the record value. Must provide only one of data, content, value.
    priority number
    The priority of the record.
    proxied boolean
    Whether the record gets Cloudflare's origin protection.
    tags string[]
    Custom tags for the DNS record.
    ttl number
    The TTL of the record.
    value string
    The value of the record. Must provide only one of data, content, value.

    Deprecated: value is deprecated in favour of content and will be removed in the next major release.

    name str
    The name of the record. Modifying this attribute will force creation of a new resource.
    type str
    The type of the record. Available values: A, AAAA, CAA, CNAME, TXT, SRV, LOC, MX, NS, SPF, CERT, DNSKEY, DS, NAPTR, SMIMEA, SSHFP, TLSA, URI, PTR, HTTPS, SVCB. Modifying this attribute will force creation of a new resource.
    zone_id str
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    allow_overwrite bool
    comment str
    Comments or notes about the DNS record. This field has no effect on DNS responses.
    content str
    The content of the record. Must provide only one of data, content, value.
    data RecordDataArgs
    Map of attributes that constitute the record value. Must provide only one of data, content, value.
    priority int
    The priority of the record.
    proxied bool
    Whether the record gets Cloudflare's origin protection.
    tags Sequence[str]
    Custom tags for the DNS record.
    ttl int
    The TTL of the record.
    value str
    The value of the record. Must provide only one of data, content, value.

    Deprecated: value is deprecated in favour of content and will be removed in the next major release.

    name String
    The name of the record. Modifying this attribute will force creation of a new resource.
    type String
    The type of the record. Available values: A, AAAA, CAA, CNAME, TXT, SRV, LOC, MX, NS, SPF, CERT, DNSKEY, DS, NAPTR, SMIMEA, SSHFP, TLSA, URI, PTR, HTTPS, SVCB. Modifying this attribute will force creation of a new resource.
    zoneId String
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    allowOverwrite Boolean
    comment String
    Comments or notes about the DNS record. This field has no effect on DNS responses.
    content String
    The content of the record. Must provide only one of data, content, value.
    data Property Map
    Map of attributes that constitute the record value. Must provide only one of data, content, value.
    priority Number
    The priority of the record.
    proxied Boolean
    Whether the record gets Cloudflare's origin protection.
    tags List<String>
    Custom tags for the DNS record.
    ttl Number
    The TTL of the record.
    value String
    The value of the record. Must provide only one of data, content, value.

    Deprecated: value is deprecated in favour of content and will be removed in the next major release.

    Outputs

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

    CreatedOn string
    The RFC3339 timestamp of when the record was created.
    Hostname string
    The FQDN of the record.
    Id string
    The provider-assigned unique ID for this managed resource.
    Metadata Dictionary<string, string>
    A key-value map of string metadata Cloudflare associates with the record.
    ModifiedOn string
    The RFC3339 timestamp of when the record was last modified.
    Proxiable bool
    Shows whether this record can be proxied.
    CreatedOn string
    The RFC3339 timestamp of when the record was created.
    Hostname string
    The FQDN of the record.
    Id string
    The provider-assigned unique ID for this managed resource.
    Metadata map[string]string
    A key-value map of string metadata Cloudflare associates with the record.
    ModifiedOn string
    The RFC3339 timestamp of when the record was last modified.
    Proxiable bool
    Shows whether this record can be proxied.
    createdOn String
    The RFC3339 timestamp of when the record was created.
    hostname String
    The FQDN of the record.
    id String
    The provider-assigned unique ID for this managed resource.
    metadata Map<String,String>
    A key-value map of string metadata Cloudflare associates with the record.
    modifiedOn String
    The RFC3339 timestamp of when the record was last modified.
    proxiable Boolean
    Shows whether this record can be proxied.
    createdOn string
    The RFC3339 timestamp of when the record was created.
    hostname string
    The FQDN of the record.
    id string
    The provider-assigned unique ID for this managed resource.
    metadata {[key: string]: string}
    A key-value map of string metadata Cloudflare associates with the record.
    modifiedOn string
    The RFC3339 timestamp of when the record was last modified.
    proxiable boolean
    Shows whether this record can be proxied.
    created_on str
    The RFC3339 timestamp of when the record was created.
    hostname str
    The FQDN of the record.
    id str
    The provider-assigned unique ID for this managed resource.
    metadata Mapping[str, str]
    A key-value map of string metadata Cloudflare associates with the record.
    modified_on str
    The RFC3339 timestamp of when the record was last modified.
    proxiable bool
    Shows whether this record can be proxied.
    createdOn String
    The RFC3339 timestamp of when the record was created.
    hostname String
    The FQDN of the record.
    id String
    The provider-assigned unique ID for this managed resource.
    metadata Map<String>
    A key-value map of string metadata Cloudflare associates with the record.
    modifiedOn String
    The RFC3339 timestamp of when the record was last modified.
    proxiable Boolean
    Shows whether this record can be proxied.

    Look up Existing Record Resource

    Get an existing Record 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?: RecordState, opts?: CustomResourceOptions): Record
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            allow_overwrite: Optional[bool] = None,
            comment: Optional[str] = None,
            content: Optional[str] = None,
            created_on: Optional[str] = None,
            data: Optional[RecordDataArgs] = None,
            hostname: Optional[str] = None,
            metadata: Optional[Mapping[str, str]] = None,
            modified_on: Optional[str] = None,
            name: Optional[str] = None,
            priority: Optional[int] = None,
            proxiable: Optional[bool] = None,
            proxied: Optional[bool] = None,
            tags: Optional[Sequence[str]] = None,
            ttl: Optional[int] = None,
            type: Optional[str] = None,
            value: Optional[str] = None,
            zone_id: Optional[str] = None) -> Record
    func GetRecord(ctx *Context, name string, id IDInput, state *RecordState, opts ...ResourceOption) (*Record, error)
    public static Record Get(string name, Input<string> id, RecordState? state, CustomResourceOptions? opts = null)
    public static Record get(String name, Output<String> id, RecordState 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:
    AllowOverwrite bool
    Comment string
    Comments or notes about the DNS record. This field has no effect on DNS responses.
    Content string
    The content of the record. Must provide only one of data, content, value.
    CreatedOn string
    The RFC3339 timestamp of when the record was created.
    Data RecordData
    Map of attributes that constitute the record value. Must provide only one of data, content, value.
    Hostname string
    The FQDN of the record.
    Metadata Dictionary<string, string>
    A key-value map of string metadata Cloudflare associates with the record.
    ModifiedOn string
    The RFC3339 timestamp of when the record was last modified.
    Name string
    The name of the record. Modifying this attribute will force creation of a new resource.
    Priority int
    The priority of the record.
    Proxiable bool
    Shows whether this record can be proxied.
    Proxied bool
    Whether the record gets Cloudflare's origin protection.
    Tags List<string>
    Custom tags for the DNS record.
    Ttl int
    The TTL of the record.
    Type string
    The type of the record. Available values: A, AAAA, CAA, CNAME, TXT, SRV, LOC, MX, NS, SPF, CERT, DNSKEY, DS, NAPTR, SMIMEA, SSHFP, TLSA, URI, PTR, HTTPS, SVCB. Modifying this attribute will force creation of a new resource.
    Value string
    The value of the record. Must provide only one of data, content, value.

    Deprecated: value is deprecated in favour of content and will be removed in the next major release.

    ZoneId string
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    AllowOverwrite bool
    Comment string
    Comments or notes about the DNS record. This field has no effect on DNS responses.
    Content string
    The content of the record. Must provide only one of data, content, value.
    CreatedOn string
    The RFC3339 timestamp of when the record was created.
    Data RecordDataArgs
    Map of attributes that constitute the record value. Must provide only one of data, content, value.
    Hostname string
    The FQDN of the record.
    Metadata map[string]string
    A key-value map of string metadata Cloudflare associates with the record.
    ModifiedOn string
    The RFC3339 timestamp of when the record was last modified.
    Name string
    The name of the record. Modifying this attribute will force creation of a new resource.
    Priority int
    The priority of the record.
    Proxiable bool
    Shows whether this record can be proxied.
    Proxied bool
    Whether the record gets Cloudflare's origin protection.
    Tags []string
    Custom tags for the DNS record.
    Ttl int
    The TTL of the record.
    Type string
    The type of the record. Available values: A, AAAA, CAA, CNAME, TXT, SRV, LOC, MX, NS, SPF, CERT, DNSKEY, DS, NAPTR, SMIMEA, SSHFP, TLSA, URI, PTR, HTTPS, SVCB. Modifying this attribute will force creation of a new resource.
    Value string
    The value of the record. Must provide only one of data, content, value.

    Deprecated: value is deprecated in favour of content and will be removed in the next major release.

    ZoneId string
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    allowOverwrite Boolean
    comment String
    Comments or notes about the DNS record. This field has no effect on DNS responses.
    content String
    The content of the record. Must provide only one of data, content, value.
    createdOn String
    The RFC3339 timestamp of when the record was created.
    data RecordData
    Map of attributes that constitute the record value. Must provide only one of data, content, value.
    hostname String
    The FQDN of the record.
    metadata Map<String,String>
    A key-value map of string metadata Cloudflare associates with the record.
    modifiedOn String
    The RFC3339 timestamp of when the record was last modified.
    name String
    The name of the record. Modifying this attribute will force creation of a new resource.
    priority Integer
    The priority of the record.
    proxiable Boolean
    Shows whether this record can be proxied.
    proxied Boolean
    Whether the record gets Cloudflare's origin protection.
    tags List<String>
    Custom tags for the DNS record.
    ttl Integer
    The TTL of the record.
    type String
    The type of the record. Available values: A, AAAA, CAA, CNAME, TXT, SRV, LOC, MX, NS, SPF, CERT, DNSKEY, DS, NAPTR, SMIMEA, SSHFP, TLSA, URI, PTR, HTTPS, SVCB. Modifying this attribute will force creation of a new resource.
    value String
    The value of the record. Must provide only one of data, content, value.

    Deprecated: value is deprecated in favour of content and will be removed in the next major release.

    zoneId String
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    allowOverwrite boolean
    comment string
    Comments or notes about the DNS record. This field has no effect on DNS responses.
    content string
    The content of the record. Must provide only one of data, content, value.
    createdOn string
    The RFC3339 timestamp of when the record was created.
    data RecordData
    Map of attributes that constitute the record value. Must provide only one of data, content, value.
    hostname string
    The FQDN of the record.
    metadata {[key: string]: string}
    A key-value map of string metadata Cloudflare associates with the record.
    modifiedOn string
    The RFC3339 timestamp of when the record was last modified.
    name string
    The name of the record. Modifying this attribute will force creation of a new resource.
    priority number
    The priority of the record.
    proxiable boolean
    Shows whether this record can be proxied.
    proxied boolean
    Whether the record gets Cloudflare's origin protection.
    tags string[]
    Custom tags for the DNS record.
    ttl number
    The TTL of the record.
    type string
    The type of the record. Available values: A, AAAA, CAA, CNAME, TXT, SRV, LOC, MX, NS, SPF, CERT, DNSKEY, DS, NAPTR, SMIMEA, SSHFP, TLSA, URI, PTR, HTTPS, SVCB. Modifying this attribute will force creation of a new resource.
    value string
    The value of the record. Must provide only one of data, content, value.

    Deprecated: value is deprecated in favour of content and will be removed in the next major release.

    zoneId string
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    allow_overwrite bool
    comment str
    Comments or notes about the DNS record. This field has no effect on DNS responses.
    content str
    The content of the record. Must provide only one of data, content, value.
    created_on str
    The RFC3339 timestamp of when the record was created.
    data RecordDataArgs
    Map of attributes that constitute the record value. Must provide only one of data, content, value.
    hostname str
    The FQDN of the record.
    metadata Mapping[str, str]
    A key-value map of string metadata Cloudflare associates with the record.
    modified_on str
    The RFC3339 timestamp of when the record was last modified.
    name str
    The name of the record. Modifying this attribute will force creation of a new resource.
    priority int
    The priority of the record.
    proxiable bool
    Shows whether this record can be proxied.
    proxied bool
    Whether the record gets Cloudflare's origin protection.
    tags Sequence[str]
    Custom tags for the DNS record.
    ttl int
    The TTL of the record.
    type str
    The type of the record. Available values: A, AAAA, CAA, CNAME, TXT, SRV, LOC, MX, NS, SPF, CERT, DNSKEY, DS, NAPTR, SMIMEA, SSHFP, TLSA, URI, PTR, HTTPS, SVCB. Modifying this attribute will force creation of a new resource.
    value str
    The value of the record. Must provide only one of data, content, value.

    Deprecated: value is deprecated in favour of content and will be removed in the next major release.

    zone_id str
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    allowOverwrite Boolean
    comment String
    Comments or notes about the DNS record. This field has no effect on DNS responses.
    content String
    The content of the record. Must provide only one of data, content, value.
    createdOn String
    The RFC3339 timestamp of when the record was created.
    data Property Map
    Map of attributes that constitute the record value. Must provide only one of data, content, value.
    hostname String
    The FQDN of the record.
    metadata Map<String>
    A key-value map of string metadata Cloudflare associates with the record.
    modifiedOn String
    The RFC3339 timestamp of when the record was last modified.
    name String
    The name of the record. Modifying this attribute will force creation of a new resource.
    priority Number
    The priority of the record.
    proxiable Boolean
    Shows whether this record can be proxied.
    proxied Boolean
    Whether the record gets Cloudflare's origin protection.
    tags List<String>
    Custom tags for the DNS record.
    ttl Number
    The TTL of the record.
    type String
    The type of the record. Available values: A, AAAA, CAA, CNAME, TXT, SRV, LOC, MX, NS, SPF, CERT, DNSKEY, DS, NAPTR, SMIMEA, SSHFP, TLSA, URI, PTR, HTTPS, SVCB. Modifying this attribute will force creation of a new resource.
    value String
    The value of the record. Must provide only one of data, content, value.

    Deprecated: value is deprecated in favour of content and will be removed in the next major release.

    zoneId String
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.

    Supporting Types

    RecordData, RecordDataArgs

    Algorithm int
    Altitude double
    Certificate string
    Content string
    Digest string
    DigestType int
    Fingerprint string
    Flags string
    KeyTag int
    LatDegrees int
    LatDirection string
    LatMinutes int
    LatSeconds double
    LongDegrees int
    LongDirection string
    LongMinutes int
    LongSeconds double
    MatchingType int
    Name string
    Order int
    Port int
    PrecisionHorz double
    PrecisionVert double
    Preference int
    Priority int
    Proto string
    Protocol int
    PublicKey string
    Regex string
    Replacement string
    Selector int
    Service string
    Size double
    Tag string
    Target string
    Type int
    Usage int
    Value string
    Weight int
    Algorithm int
    Altitude float64
    Certificate string
    Content string
    Digest string
    DigestType int
    Fingerprint string
    Flags string
    KeyTag int
    LatDegrees int
    LatDirection string
    LatMinutes int
    LatSeconds float64
    LongDegrees int
    LongDirection string
    LongMinutes int
    LongSeconds float64
    MatchingType int
    Name string
    Order int
    Port int
    PrecisionHorz float64
    PrecisionVert float64
    Preference int
    Priority int
    Proto string
    Protocol int
    PublicKey string
    Regex string
    Replacement string
    Selector int
    Service string
    Size float64
    Tag string
    Target string
    Type int
    Usage int
    Value string
    Weight int
    algorithm Integer
    altitude Double
    certificate String
    content String
    digest String
    digestType Integer
    fingerprint String
    flags String
    keyTag Integer
    latDegrees Integer
    latDirection String
    latMinutes Integer
    latSeconds Double
    longDegrees Integer
    longDirection String
    longMinutes Integer
    longSeconds Double
    matchingType Integer
    name String
    order Integer
    port Integer
    precisionHorz Double
    precisionVert Double
    preference Integer
    priority Integer
    proto String
    protocol Integer
    publicKey String
    regex String
    replacement String
    selector Integer
    service String
    size Double
    tag String
    target String
    type Integer
    usage Integer
    value String
    weight Integer
    algorithm number
    altitude number
    certificate string
    content string
    digest string
    digestType number
    fingerprint string
    flags string
    keyTag number
    latDegrees number
    latDirection string
    latMinutes number
    latSeconds number
    longDegrees number
    longDirection string
    longMinutes number
    longSeconds number
    matchingType number
    name string
    order number
    port number
    precisionHorz number
    precisionVert number
    preference number
    priority number
    proto string
    protocol number
    publicKey string
    regex string
    replacement string
    selector number
    service string
    size number
    tag string
    target string
    type number
    usage number
    value string
    weight number
    algorithm Number
    altitude Number
    certificate String
    content String
    digest String
    digestType Number
    fingerprint String
    flags String
    keyTag Number
    latDegrees Number
    latDirection String
    latMinutes Number
    latSeconds Number
    longDegrees Number
    longDirection String
    longMinutes Number
    longSeconds Number
    matchingType Number
    name String
    order Number
    port Number
    precisionHorz Number
    precisionVert Number
    preference Number
    priority Number
    proto String
    protocol Number
    publicKey String
    regex String
    replacement String
    selector Number
    service String
    size Number
    tag String
    target String
    type Number
    usage Number
    value String
    weight Number

    Import

    $ pulumi import cloudflare:index/record:Record example <zone_id>/<record_id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Cloudflare v5.42.0 published on Thursday, Oct 31, 2024 by Pulumi