mirror of
https://github.com/rssnyder/terraform-digitalocean-domain-redirect
synced 2026-06-30 16:50:34 -05:00
No description
- HCL 100%
| .github | ||
| .gitignore | ||
| main.tf | ||
| outputs.tf | ||
| provider.tf | ||
| README.md | ||
| vars.tf | ||
Digital Ocean Domain Redirect Terraform Module
Terraform module which redirects a domain in digitalocean to another URL
Usage
module "music" {
source = "github.com/rssnyder/terraform-digitalocean-domain-redirect?ref=v0.1.1"
domain = "rileysnyder.org"
subdomain = "music"
url = "https://music.youtube.com/channel/UCb4yhRr7Pucxv3lb_GgGeUg"
}
Redirects music.rileysnyder.org to music.youtube.com/channel/UCb4yhRr7Pucxv3lb_GgGeUg
How it works
Normally a CNAME record can only redirect to another domain and not a full URL with paths.
You must specify a domain that is already registered in your digital ocean account.
Resources
| Name | Type |
|---|---|
| digitalocean_record.this | resource |
| digitalocean_record.this | resource |
Inputs
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| domain | The name of the domain. | string |
yes | |
| subdomain | The subdomain to use for the redirect. | string |
yes | |
| url | The full URL to redirect to. Schema included. | string |
yes |
Outputs
| Name | Description |
|---|---|
| cname_value | The value set in the CNAME record. |
| txt_name | The name of the TXT record. |
| txt_value | The value set in the TXT record. |