Skip to content

rssnyder/terraform-digitalocean-domain-redirect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

redirect.name

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.