Skip to content

ProjectCircleIL/terraform-google-cdn

Google Cloud CDN Terraform module

The 'terraform-google-cdn' module simplifies the deployment and management of a Content Delivery Network (CDN) on Goolge Cloud. This module allows you to accelerate content delivery, enhance user experience and improve the performance of your web applications by leveraging Google's global network infrastructure.

Usage

module "cdn" {
  source = "github.com/MichaelFarook/terraform-google-cdn"

  bucket_name = "example-bucket"
  description = "CDN module"
  project     = "you-project"
  domain      = "example.com"

  # Conditional creation
  create_dns_record = true
  dns_cdn_domain    = "cdn-domain"
  dns_managed_zone  = "example-zone"

  labels = {
    terraform = true
    devops    = true
  }
}

Examples

Requirements

Name Version
terraform >= 1.5
google >= 4.84.0, < 6

Providers

Name Version
google >= 4.84.0, < 6

Modules

No modules.

Resources

Name Type
google_compute_backend_bucket.this resource
google_compute_global_address.this resource
google_compute_global_forwarding_rule.this resource
google_compute_managed_ssl_certificate.this resource
google_compute_target_https_proxy.this resource
google_compute_url_map.this resource
google_dns_record_set.this resource

Inputs

Name Description Type Default Required
address_type The address type of cdn public address string "EXTERNAL" no
bucket_name The name of the bucket that will be the backend for our CDN string n/a yes
create_dns_record Create the DNS record set to the frontend bool false no
description An optional description of this resource string "" no
dns_cdn_domain Time CDN dashboard Domain string "" no
dns_managed_zone The managed zone of DNS string "" no
dns_record_type The type of DNS record string "A" no
dns_ttl Time to Live (TTL) for DNS record number 300 no
domain The domain of your frontend application string n/a yes
ip_protocol The type of protocole to global forwarding rule string "TCP" no
ip_version The IP version of cdn public address string "IPV4" no
labels The lables to attach to the resources map(string) {} no
port_range The port range to global forwarding rule string "443" no
prefix Name prefix for the cdn resources string "cdn" no
project The ID of the project where this module will be created string n/a yes

Outputs

Name Description
external_ip The external global address

Authors

Module is maintained by Michael Nakhtigal.

License

Apache 2 Licensed. See LICENSE for full details.

About

Content delivery network Terraform module Google Cloud

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Languages