Skip to content

This shared Terraform module create an S3 bucket and Cloudflare configuration in order to serve static files from the bucket.

Notifications You must be signed in to change notification settings

opsgang/terraform-cloudflare-aws-static-website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This terraform module creates an S3 bucket on AWS and CloudFlare configuration for serving static websites from the bucket.

Example use cases

Requirements

Name Version
terraform >= 1.0
aws ~> 3.53
cloudflare ~> 2.25

Providers

Name Version
aws ~> 3.53
cloudflare ~> 2.25

Inputs

Name Description Type Default Required
cf_plan_type Whether Cloudflare plan is free or paid string n/a yes
cf_zone_type Whether the DNS Zone will be on Cloudflare or not string n/a yes
domain_name DNS Zone to use string n/a yes
cf_allow_tls_1_3 Enable the latest version of the TLS protocol for improved security and performance. string "on" no
cf_always_online Enable/disable WayBackMachine during an outage string "on" no
cf_always_use_https Auto redirect http to https string "on" no
cf_automatic_https_rewrites Automatic HTTPS Rewrites helps fix mixed content by changing “http” to “https” for all resources or links on your web site that can be served with HTTPS. string "on" no
cf_block_user_agents Block User Agents list(string) [] no
cf_blocked_paths Block URI Paths list(string) [] no
cf_brotli Speed up page load times for your visitor’s HTTPS traffic by applying Brotli compression. string "on" no
cf_browser_cache_ttl Determine the length of time Cloudflare instructs a visitor’s browser to cache files. number 14400 no
cf_browser_check Evaluate HTTP headers from your visitors browser for threats. If a threat is found a block page will be delivered. string "on" no
cf_cache_level Determine how much of your website’s static content you want Cloudflare to cache. string "aggressive" no
cf_challenge_ttl Specify the length of time that a visitor, who has successfully completed a Captcha or JavaScript Challenge, can access your website number 1800 no
cf_development_mode Temporarily bypass our cache allowing you to see changes to your origin server in realtime. string "off" no
cf_email_obfuscation Display obfuscated email addresses on your website to prevent harvesting by bots and spammers. string "off" no
cf_hotlink_protection Protect your images from off-site linking. string "off" no
cf_http3 Accelerates HTTP requests by using QUIC, which provides encryption and performance improvements compared to TCP and TLS. string "on" no
cf_ip_geolocation Include the country code of the visitor location with all requests to your website. string "on" no
cf_js_challenge_country_codes Use JS Challenge for the country codes list(string) [] no
cf_jump_start Should Cloudflare scan your DNS zones initially? bool true no
cf_min_tls_version Only allow HTTPS connections from visitors that support the selected TLS protocol version or newer. string "1.2" no
cf_minify_css Disable/enable CSS minification string "on" no
cf_minify_html Disable/enable HTML minification string "off" no
cf_minify_js Disable/enable JavaScript minification string "on" no
cf_security_level n/a string "high" no
cf_ssl_encryption_mode Choose e2e encryption option string "full" no
tags AWS Tags to use on the resources map(any) {} no

Outputs

Name Description
bucket_name n/a
cf_name_servers n/a
cf_verification_code n/a

About

This shared Terraform module create an S3 bucket and Cloudflare configuration in order to serve static files from the bucket.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages