Skip to content

About

Terraform module for CloudFront destribution

Resources

Stars

0 stars

Watchers

8 watching

Forks

Repository files navigation

Requirements

Name Version
aws >= 5.0

Providers

Name Version
aws >= 5.0
aws.us_east_1 >= 5.0

Modules

No modules.

Resources

Name Type
aws_cloudfront_distribution.cloudfront resource
aws_cloudfront_vpc_origin.vpc_origin resource
aws_cloudwatch_log_delivery.access_logs resource
aws_cloudwatch_log_delivery_destination.access_logs resource
aws_cloudwatch_log_delivery_source.access_logs resource
aws_cloudwatch_log_group.access_logs resource
aws_cloudwatch_log_resource_policy.access_logs_delivery resource
aws_route53_record.cloudfront resource
aws_route53_record.cloudfront_ipv6 resource
aws_s3_object.object resource

Inputs

Name Description Type Default Required
acm_arn ACM cert arn string "" no
allowed_methods Allowed methods list(any)
[
"GET",
"HEAD"
]
no
cache_policy_id AWS managed cache policy id string "" no
cloudwatch_access_logs CloudFront access logs delivered to CloudWatch Logs. When enabled, the module creates the log group, log delivery source/destination, delivery, and the required resource policy, all in us-east-1, managed internally by the module.
object({
enabled = optional(bool, false)
create_log_group = optional(bool, true)
log_group_name = optional(string, null)
log_group_retention_days = optional(number, 30)
log_group_arn = optional(string, null)
output_format = optional(string, "json")
record_fields = optional(list(string), [])
})
{} no
cached_methods Cached methods list(any)
[
"GET",
"HEAD"
]
no
comment n/a string " " no
compress Compress file bool false no
custom_error_response Custom error response list(any) [] no
default_cache_behaviour_target_origin_id Target origin ID for default cache behaviour string n/a yes
default_cache_forwarded_values forwarded values for default cache behavior any {} no
default_root_object Default root object string "index.html" no
default_root_object_content Content for the default root object string "" no
domain_aliases domain aliases list(string) null no
enabled Cloudfront state bool true no
function_association Function association list(any) [] no
http_version HTTP version to be allowed string "http2" no
is_ipv6_enabled ipv6 status bool true no
lambda_function_association Lambda edge association list(any) [] no
logging_config Cloudfront logging config map(any) {} no
ordered_cache_behavior List of ordered cache behaviour any [] no
origin Origin configuration any n/a yes
origin_request_policy_id Unique identifier of the origin request policy that is attached to the behavior string "" no
put_default_root_object flag for default s3 object on index.html bool false no
route53_zone_id Route53 zone id string "" no
s3_bucket_name s3 bucket name for flag string "" no
ttl_values map of ttl variables map(any) {} no
viewer_protocol_policy the protocol that users can use to access the files in the origin, valid values are allow-all, https-only, or redirect-to-https. string "redirect-to-https" no
vpc_origins Map of VPC origin configurations to create aws_cloudfront_vpc_origin resources for private ALB/NLB access any {} no
web_acl_id WAF web ACL id string "" no

Outputs

Name Description
aliases n/a
arn n/a
cloudwatch_log_group_arn ARN of the CloudWatch log group receiving CloudFront access logs (null if disabled or using an existing log group)
cloudwatch_log_group_name Name of the CloudWatch log group receiving CloudFront access logs (null if disabled or using an existing log group)
domain_name n/a
hosted_zone_id n/a
id n/a
vpc_origin_arns Map of VPC origin keys to their ARNs
vpc_origin_ids Map of VPC origin keys to their IDs

License

Apache 2 Licensed. See LICENSE for full details.

About

Terraform module for CloudFront destribution

Resources

Stars

0 stars

Watchers

8 watching

Forks

Releases

Packages

Contributors

Languages