Skip to content
Start here

Security TXT

resource cloudflare_security_txt

required Expand Collapse
zone_id: String

Identifier.

expires: Time

RFC3339-formatted date and time string indicating the time that, after which, the contents of the security.txt file should be considered stale. It is recommended that this value is less than a year into the future.

contact: List[String]

Methods that researchers should use for reporting vulnerabilities. Can be a URI for an email address, phone number, or URL.

optional Expand Collapse
acknowledgments?: List[String]

Link(s) to a page where security researchers are recognised for their reports.

canonical?: List[String]

Canonical URI where the security.txt file is located.

encryption?: List[String]

URI(s) pointing to a location where an encryption key that researchers should use for encrypted communications can be retrieved. The key itself must not appear in this field.

hiring?: List[String]

Link(s) to any security-related job positions.

policy?: List[String]

Link(s) to where a vulnerability disclosure policy is located.

enabled?: Bool

Whether or not to serve the security.txt file in this zone. If false, security.txt requests will pass through to the origin server.

preferred_languages?: String

Comma-separated list of natural languages that are preferred when submitting security reports. Language codes should be as defined in RFC5646.

computed Expand Collapse
id: String

Identifier.

success: Bool

Whether the API call was successful.

errors: List[Attributes]
code: Int64
message: String
documentation_url: String
source: Attributes
pointer: String
messages: List[Attributes]
code: Int64
message: String
documentation_url: String
source: Attributes
pointer: String

cloudflare_security_txt

resource "cloudflare_security_txt" "example_security_txt" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  contact = ["mailto:security@example.com", "tel:+1-201-555-0123", "https://example.com/security-contact.html"]
  expires = "2027-12-31T23:59:59Z"
  acknowledgments = ["https://example.com/hall-of-fame.html"]
  canonical = ["https://www.example.com/.well-known/security.txt"]
  enabled = true
  encryption = ["https://example.com/pgp-key.txt", "dns:5d2d37ab76d47d36._openpgpkey.example.com?type=OPENPGPKEY", "openpgp4fpr:5f2de5521c63a801ab59ccb603d49de44b29100f"]
  hiring = ["https://example.com/jobs.html"]
  policy = ["https://example.com/disclosure-policy.html"]
  preferred_languages = "en, es, fr"
}

data cloudflare_security_txt

required Expand Collapse
zone_id: String

Identifier.

computed Expand Collapse
id: String

Identifier.

enabled: Bool

Whether or not to serve the security.txt file in this zone. If false, security.txt requests will pass through to the origin server.

expires: Time

RFC3339-formatted date and time string indicating the time that, after which, the contents of the security.txt file should be considered stale. It is recommended that this value is less than a year into the future.

preferred_languages: String

Comma-separated list of natural languages that are preferred when submitting security reports. Language codes should be as defined in RFC5646.

acknowledgments: List[String]

Link(s) to a page where security researchers are recognised for their reports.

canonical: List[String]

Canonical URI where the security.txt file is located.

contact: List[String]

Methods that researchers should use for reporting vulnerabilities. Can be a URI for an email address, phone number, or URL.

encryption: List[String]

URI(s) pointing to a location where an encryption key that researchers should use for encrypted communications can be retrieved. The key itself must not appear in this field.

hiring: List[String]

Link(s) to any security-related job positions.

policy: List[String]

Link(s) to where a vulnerability disclosure policy is located.

cloudflare_security_txt

data "cloudflare_security_txt" "example_security_txt" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
}