Skip to content

Spofibo/terraform-aws-wordpress-w3tc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wordpress W3TC CDN for AWS Terraform module

Terraform module which creates the S3, IAM and policies required for W3TC's CDN feature

Usage

module "mysite_w3tc" {
  source = "github.com/Spofibo/terraform-aws-wordpress-w3tc"

  name_prefix              = "site"
  cdn_url                  = "cdn.site.com"
  cors_allowed_origins     = ["https://site.com"]
  enable_cloudflare_access = true
}

Requirements

Name Version
aws ~> 5.2

Providers

Name Version
aws ~> 5.2

Modules

No modules.

Resources

Name Type
aws_iam_access_key.this resource
aws_iam_user.this resource
aws_iam_user_policy.this resource
aws_s3_bucket.this resource
aws_s3_bucket_cors_configuration.this resource
aws_s3_bucket_policy.this resource

Inputs

Name Description Type Default Required
cdn_url The name of the bucket should match the name of your desired CDN subdomain. I.E.: cdn.spofibo.com string n/a yes
cloudflare_ips List of Cloudflare IP addresses that have access to the CDN bucket list(any)
[
"2400:cb00::/32",
"2606:4700::/32",
"2803:f800::/32",
"2405:b500::/32",
"2405:8100::/32",
"2a06:98c0::/29",
"2c0f:f248::/32",
"173.245.48.0/20",
"103.21.244.0/22",
"103.22.200.0/22",
"103.31.4.0/22",
"141.101.64.0/18",
"108.162.192.0/18",
"190.93.240.0/20",
"188.114.96.0/20",
"197.234.240.0/22",
"198.41.128.0/17",
"162.158.0.0/15",
"172.64.0.0/13",
"131.0.72.0/22",
"104.16.0.0/13",
"104.24.0.0/14"
]
no
cors_configuration S3 bucket CORS configuration
list(object({
allowed_headers : list(string)
allowed_methods : list(string)
allowed_origins : list(string)
expose_headers : list(string)
max_age_seconds : number
}))
[
{
"allowed_headers": [
""
],
"allowed_methods": [
"GET"
],
"allowed_origins": [
"
"
],
"expose_headers": [
"ETag"
],
"id": "",
"max_age_seconds": 3000
}
]
no
enable_cloudflare_access Toggle to enable Cloudflare access to the CDN bucket bool false no
name_prefix Name prefix string n/a yes

Outputs

Name Description
access_id n/a
access_secret n/a

About

Terraform module which creates the S3, IAM and policies required for W3TC's CDN feature

Topics

Resources

License

Stars

Watchers

Forks

Languages