https://github.com/nullstone-modules/gcp-subdomain
Nullstone module to create a subdomain on GCP.
https://github.com/nullstone-modules/gcp-subdomain
gcp nullstone nullstone-module terraform terraform-module
Last synced: 4 months ago
JSON representation
Nullstone module to create a subdomain on GCP.
- Host: GitHub
- URL: https://github.com/nullstone-modules/gcp-subdomain
- Owner: nullstone-modules
- License: mit
- Created: 2021-08-02T12:28:10.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2025-12-23T19:53:24.000Z (6 months ago)
- Last Synced: 2026-01-30T14:54:49.675Z (4 months ago)
- Topics: gcp, nullstone, nullstone-module, terraform, terraform-module
- Language: HCL
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# gcp-subdomain
Nullstone module to create a subdomain on GCP.
## Overview
This module creates a DNS Zone on Google Cloud DNS.
By default, this module will create an SSL certificate using GCP Certificate Manager.
This can be disabled by setting the variable `disable_certificate = true`.
This certificate is created for Cloud CDNs and Load Balancing (most common use case).
A certificate and certificate map are created and emitted as outputs for use to attach to a GCP Load Balancer.
## Subdomain Calculation
This module adds the current Nullstone environment into the FQDN for the resulting subdomain.
#### Example
Domain: `acme.com`
Env: `dev`
`dns_name`: `api`
FQDN: `api.dev.acme.com`
If `var.create_vanity = true`, then the environment chunk is omitted from the FQDN.
In the above example, the FQDN becomes: `api.acme.com`.
Typically, enabling this variable is done to create a production URL.
## Wildcard Certificate
If this module detects that you are using a certificate with a wildcard subdomain, it will flatten the above subdomain calculation.
#### Example
Certificate Domain: `*.acme.com`
Domain: `acme.com`
Env: `dev`
`dns_name`: `api`
FQDN: `api-dev.acme.com`