Skip to content

simplycubed/terraform-google-domain-redirect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform Module: Google Cloud DNS Domain Redirect

A Terraform module for Google Cloud Platform that simplifies the creation & configuration domain redirect for Cloud DNS.

Table of contents

Introduction

Google Cloud DNS does not have built-in support for 30x redirects. There has been an open feature request since 2017 with no ETA. This module provides this functionality through the use of a Cloud Storage bucket, a managed certificate, a global IP address, and url mappings.

Requirements

  • Terraform 0.14 or higher.
  • google provider 3.67.0 or higher.
  • google-beta provider 3.67.0 or higher.

Usage

module "www_example" {
  source        = "simplycubed/domain-redirect/google"
  hostname      = "www.${var.base_domain}"
  host_redirect = var.base_domain
}

Inputs

Required inputs

Name Description Type
hostname The name of the website and the Cloud Storage bucket to create (e.g. static.foo.com). string
host_redirect The name of the target domain to redirect string
https_redirect Issue TLS certificate and enable HTTPS bool
strip_query Strip URL query parameters bool

Outputs

In addition to the inputs documented above, the following values are available as outputs:

Name Description Type
load_balancer_ip_address IP address of the HTTP Cloud Load Balancer. string

Changelog

  • 1.0.0
    • Release stable version.

Roadmap

Issues containing possible future enhancements can be found here.

About

Terraform module to simplify redirecting domains on Google Cloud DNS.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages