Terraform module which creates the S3, IAM and policies required for W3TC's CDN feature
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
}| Name | Version |
|---|---|
| aws | ~> 5.2 |
| Name | Version |
|---|---|
| aws | ~> 5.2 |
No modules.
| 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 |
| 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) |
[ |
no |
| cors_configuration | S3 bucket CORS configuration | list(object({ |
[ |
no |
| enable_cloudflare_access | Toggle to enable Cloudflare access to the CDN bucket | bool |
false |
no |
| name_prefix | Name prefix | string |
n/a | yes |
| Name | Description |
|---|---|
| access_id | n/a |
| access_secret | n/a |