Record

class Record : KotlinCustomResource

Provides a Cloudflare record resource.

Example Usage

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) {
var example = new Record("example", RecordArgs.builder()
.zoneId(var_.cloudflare_zone_id())
.name("example")
.value("192.0.2.1")
.type("A")
.ttl(3600)
.build());
var _sipTls = new Record("_sipTls", RecordArgs.builder()
.zoneId(var_.cloudflare_zone_id())
.name("_sip._tls")
.type("SRV")
.data(RecordDataArgs.builder()
.service("_sip")
.proto("_tls")
.name("example-srv")
.priority(0)
.weight(0)
.port(443)
.target("example.com")
.build())
.build());
}
}

Import

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

Properties

Link copied to clipboard
val allowOverwrite: Output<Boolean>?

Allow creation of this record in Terraform to overwrite an existing record, if any. This does not affect the ability to update the record in Terraform and does not prevent other resources within Terraform or manual changes outside Terraform from overwriting this record. This configuration is not recommended for most environments

Link copied to clipboard
val comment: Output<String>?

Comments or notes about the DNS record. This field has no effect on DNS responses.

Link copied to clipboard
val createdOn: Output<String>

The RFC3339 timestamp of when the record was created.

Link copied to clipboard
val data: Output<RecordData>?

Map of attributes that constitute the record value. Conflicts with value.

Link copied to clipboard
val hostname: Output<String>

The FQDN of the record.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val metadata: Output<Map<String, Any>>

A key-value map of string metadata Cloudflare associates with the record.

Link copied to clipboard
val modifiedOn: Output<String>

The RFC3339 timestamp of when the record was last modified.

Link copied to clipboard
val name: Output<String>

The name of the record. Modifying this attribute will force creation of a new resource.

Link copied to clipboard
val priority: Output<Int>?

The priority of the record.

Link copied to clipboard
val proxiable: Output<Boolean>

Shows whether this record can be proxied.

Link copied to clipboard
val proxied: Output<Boolean>?

Whether the record gets Cloudflare's origin protection.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val tags: Output<List<String>>?

Custom tags for the DNS record.

Link copied to clipboard
val ttl: Output<Int>

The TTL of the record.

Link copied to clipboard
val type: Output<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. Modifying this attribute will force creation of a new resource.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val value: Output<String>

The value of the record. Conflicts with data.

Link copied to clipboard
val zoneId: Output<String>

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