--- page_title: "ona_custom_domain Resource - ona" subcategory: "Organization" description: |- Ona organization custom domain registration. Organization scope is resolved from the authenticated provider token. --- # ona_custom_domain (Resource) Ona organization custom domain registration. Organization scope is resolved from the authenticated provider token. For product context, see [Custom domain](https://ona.com/docs/ona/custom-domain). ## Example Usage ```terraform resource "ona_custom_domain" "primary" { domain_name = "ona.example.com" cloud_provider = "aws" cloud_account_id = "123456789012" } ``` ## Schema ### Required - `cloud_account_id` (String) AWS account ID or GCP project ID used for relay validation. - `cloud_provider` (String) Cloud provider that owns the relay account for this custom domain. Supported values are `aws` and `gcp`. - `domain_name` (String) Bare hostname registered as the custom domain, for example `ona.example.com`. URLs, paths, wildcard names, and trailing dots are rejected. ### Read-Only - `created_at` (String) RFC3339 timestamp when the custom-domain registration was created. - `id` (String) Custom-domain ID returned by the Ona API. - `updated_at` (String) RFC3339 timestamp when the custom-domain registration was last updated. ## Import Import is supported using the following syntax: The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example: ```shell #!/usr/bin/env sh terraform import ona_custom_domain.primary current ```