On this page
cloudflare_record
Provides a Cloudflare record resource.
Example Usage
# Add a record to the domain
resource "cloudflare_record" "foobar" {
domain = "${var.cloudflare_domain}"
name = "terraform"
value = "192.168.0.11"
type = "A"
ttl = 3600
}
Argument Reference
The following arguments are supported:
domain
- (Required) The domain to add the record toname
- (Required) The name of the recordtype
- (Required) The type of the recordvalue
- (Optional) The (string) value of the record. Either this ordata
must be specifieddata
- (Optional) Map of attributes that constitute the record value. Primarily used for LOC and SRV record types. Either this orvalue
must be specifiedttl
- (Optional) The TTL of the record (automatic: '1')priority
- (Optional) The priority of the recordproxied
- (Optional) Whether the record gets Cloudflare's origin protection; defaults tofalse
.
Attributes Reference
The following attributes are exported:
id
- The record IDhostname
- The FQDN of the recordproxiable
- Shows whether this record can be proxied, must be true if settingproxied=true
created_on
- The RFC3339 timestamp of when the record was createdmodified_on
- The RFC3339 timestamp of when the record was last modifiedmetadata
- A key-value map of string metadata cloudflare associates with the recordzone_id
- The zone id of the record
Import
Records can be imported using a composite ID formed of zone name and record ID, e.g.
$ terraform import cloudflare_record.default example.com/ch8374ftwdghsif43
© 2018 HashiCorp
Licensed under the MPL 2.0 License.
https://www.terraform.io/docs/providers/cloudflare/r/record.html