Url Forward
generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "porkbun_url_forward Resource - terraform-provider-porkbun" subcategory: "" description: |- Manages a URL forward for a domain or subdomain.
porkbun_url_forward (Resource)
Manages a URL forward for a domain or subdomain.
Example Usage
resource "porkbun_url_forward" "root" {
domain = "jian.fyi"
type = "temporary"
wildcard = false
include_path = false
location = "https://www.jiancodes.com"
}
resource "porkbun_url_forward" "wildcard" {
domain = "jian.fyi"
type = "temporary"
wildcard = true
include_path = false
location = "https://www.jiancodes.com"
}
Schema
Required
domain(String) (Force new) The domain for the URL forward.include_path(Boolean) (Force new) Whether to append the request URI path to the forwarding destination.location(String) (Force new) The destination URL to forward to.type(String) (Force new) Redirect kind.permanent= HTTP 301;temporary= HTTP 302 (default);masked= loads the destination in a frame (URL masking). For a precise code — including a 307 temporary redirect — useredirect_type. Valid values:permanent,temporary,masked.wildcard(Boolean) (Force new) Whether to also forward all subdomains of the forwarded subdomain.
Optional
redirect_type(String) (Force new) The exact redirect type; takes precedence overtypewhen supplied.301= permanent,302or307= temporary (this is how you request 307),masked= URL masking. Omit to derive from type (temporary->302, permanent->301). Valid values:301,302,307,masked.subdomain(String) (Force new) The subdomain portion only (optional, leave blank or omit for root domain). Alphanumeric and hyphens only.
Read-Only
id(String) The record ID.
Import
Import is supported using the following syntax:
The terraform import command can be used, for example:
terraform import porkbun_url_forward.example <url_forward_id>_<domain>
terraform import porkbun_url_forward.example 123456789_jiancodes.com