Custom Domains

A CustomDomain object represents an additional customer-owned domain that routes to a Files.com site.

Resource Schema

Required

PropertyDescription
domain
String
Customer-owned domain name.

Optional

PropertyDescription
workspace_id
Int64
Workspace ID (0 for the default workspace).
available_to_all_workspaces
Bool
Allow all workspaces to use this default-workspace Custom Domain.
destination
String
Where this custom domain routes. Can be site_alias, public_hosting, s3_endpoint, file_content, or unassigned (not routing traffic). Each Site can have one File Content domain in its default workspace. It applies to the whole Site and uses the Site's existing dedicated HTTPS IPs. Set to unassigned automatically when a bound public_hosting folder behavior is deleted, and can be set manually via the API for any reason.
Possible values: site_alias, public_hosting, s3_endpoint, unassigned, file_content
ssl_certificate_id
Int64
Current SSL certificate ID.
folder_behavior_id
Int64
Public Hosting behavior ID when this domain routes to a specific Public Hosting behavior. Preserved as historical context when destination becomes unassigned.

Read Only

PropertyDescription
id
Int64
Custom Domain ID.
outbound_ip_addresses
List
Eligible public IP addresses for Remote Server outbound connections. Empty when this Custom Domain is not eligible for outbound selection.
dns_status
String
Current DNS verification status.
Possible values: disabled, correct, no_records, cname_wrong, a_record, caa_conflict
brick_managed
Bool
Is this domain's SSL certificate automatically managed and renewed by Files.com?
ip_addresses
List
Dedicated public IP addresses allocated to this Custom Domain.
created_at
String
When this Custom Domain was created.
updated_at
String
When this Custom Domain was last updated.

Example Resource

resource "files_custom_domain" "example_custom_domain" {
  available_to_all_workspaces = false
  workspace_id                = 0
  destination                 = "site_alias"
  folder_behavior_id          = 1
  ssl_certificate_id          = 1
  domain                      = "files.example.com"
}

Resource Import

This Resource supports importing using the following syntax:

Example Import Command

# Custom Domains can be imported by specifying the id.
terraform import files_custom_domain.example_custom_domain 1

Data Source Schema

Required

PropertyDescription
id
Int64
Custom Domain ID.

Read Only

PropertyDescription
workspace_id
Int64
Workspace ID (0 for the default workspace).
available_to_all_workspaces
Bool
Allow all workspaces to use this default-workspace Custom Domain.
outbound_ip_addresses
List
Eligible public IP addresses for Remote Server outbound connections. Empty when this Custom Domain is not eligible for outbound selection.
domain
String
Customer-owned domain name.
destination
String
Where this custom domain routes. Can be site_alias, public_hosting, s3_endpoint, file_content, or unassigned (not routing traffic). Each Site can have one File Content domain in its default workspace. It applies to the whole Site and uses the Site's existing dedicated HTTPS IPs. Set to unassigned automatically when a bound public_hosting folder behavior is deleted, and can be set manually via the API for any reason.
Possible values: site_alias, public_hosting, s3_endpoint, unassigned, file_content
dns_status
String
Current DNS verification status.
Possible values: disabled, correct, no_records, cname_wrong, a_record, caa_conflict
ssl_certificate_id
Int64
Current SSL certificate ID.
brick_managed
Bool
Is this domain's SSL certificate automatically managed and renewed by Files.com?
folder_behavior_id
Int64
Public Hosting behavior ID when this domain routes to a specific Public Hosting behavior. Preserved as historical context when destination becomes unassigned.
ip_addresses
List
Dedicated public IP addresses allocated to this Custom Domain.
created_at
String
When this Custom Domain was created.
updated_at
String
When this Custom Domain was last updated.

Example Data Source

data "files_custom_domain" "example_custom_domain" {
  id = 1
}