RecordArgs

data class RecordArgs(val allowOverwrite: Output<Boolean>? = null, val comment: Output<String>? = null, val data: Output<RecordDataArgs>? = null, val name: Output<String>? = null, val priority: Output<Int>? = null, val proxied: Output<Boolean>? = null, val tags: Output<List<String>>? = null, val ttl: Output<Int>? = null, val type: Output<String>? = null, val value: Output<String>? = null, val zoneId: Output<String>? = null) : ConvertibleToJava<RecordArgs>

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>

Constructors

Link copied to clipboard
constructor(allowOverwrite: Output<Boolean>? = null, comment: Output<String>? = null, data: Output<RecordDataArgs>? = null, name: Output<String>? = null, priority: Output<Int>? = null, proxied: Output<Boolean>? = null, tags: Output<List<String>>? = null, ttl: Output<Int>? = null, type: Output<String>? = null, value: Output<String>? = null, zoneId: Output<String>? = null)

Properties

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

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>? = null

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

Link copied to clipboard
val data: Output<RecordDataArgs>? = null

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

Link copied to clipboard
val name: Output<String>? = null

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

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

The priority of the record.

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

Whether the record gets Cloudflare's origin protection.

Link copied to clipboard
val tags: Output<List<String>>? = null

Custom tags for the DNS record.

Link copied to clipboard
val ttl: Output<Int>? = null

The TTL of the record.

Link copied to clipboard
val type: Output<String>? = null

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 value: Output<String>? = null

The value of the record. Conflicts with data.

Link copied to clipboard
val zoneId: Output<String>? = null

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

Functions

Link copied to clipboard
open override fun toJava(): RecordArgs