Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/flaconi/terraform-aws-cloudfront-distribution
https://github.com/flaconi/terraform-aws-cloudfront-distribution
aws terraform terraform-module
Last synced: about 4 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/flaconi/terraform-aws-cloudfront-distribution
- Owner: Flaconi
- License: mit
- Created: 2019-12-02T12:17:45.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-02-14T14:26:32.000Z (almost 2 years ago)
- Last Synced: 2023-03-01T19:23:38.361Z (over 1 year ago)
- Topics: aws, terraform, terraform-module
- Language: HCL
- Homepage:
- Size: 30.3 KB
- Stars: 2
- Watchers: 9
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Terraform AWS Cloudfront distribution module
## Requirements
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 0.12.26 |
| [aws](#requirement\_aws) | >= 3 |## Providers
| Name | Version |
|------|---------|
| [aws](#provider\_aws) | >= 3 |## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| [aws_cloudfront_distribution.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudfront_distribution) | resource |## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [default\_cache\_behavior](#input\_default\_cache\_behavior) | Default Cache Behviors to be used in dynamic block | `any` | n/a | yes |
| [iam\_certificate\_id](#input\_iam\_certificate\_id) | Specifies IAM certificate id for CloudFront distribution | `string` | n/a | yes |
| [minimum\_protocol\_version](#input\_minimum\_protocol\_version) | The minimum version of the SSL protocol that you want CloudFront to use for HTTPS connections. One of SSLv3, TLSv1, TLSv1\_2016, TLSv1.1\_2016 or TLSv1.2\_2018. Default: TLSv1. NOTE: If you are using a custom certificate (specified with acm\_certificate\_arn or iam\_certificate\_id), and have specified sni-only in ssl\_support\_method, TLSv1 or later must be specified. If you have specified vip in ssl\_support\_method, only SSLv3 or TLSv1 can be specified. If you have specified cloudfront\_default\_certificate, TLSv1 must be specified. | `string` | n/a | yes |
| [aliases](#input\_aliases) | Aliases, or CNAMES, for the distribution | `list(string)` | `[]` | no |
| [comment](#input\_comment) | Any comment about the CloudFront Distribution | `string` | `""` | no |
| [create](#input\_create) | Set to false to prevent the module from creating any resources | `bool` | `true` | no |
| [custom\_error\_response](#input\_custom\_error\_response) | Custom error response to be used in dynamic block |list(object({| `[]` | no |
error_caching_min_ttl = number
error_code = number
response_code = number
response_page_path = string
}))
| [custom\_origin\_config](#input\_custom\_origin\_config) | Configuration for the custom origin config to be used in dynamic block | `any` | `[]` | no |
| [default\_root\_object](#input\_default\_root\_object) | The object that you want CloudFront to return (for example, index.html) when an end user requests the root URL | `string` | `""` | no |
| [dynamic\_s3\_origin\_config](#input\_dynamic\_s3\_origin\_config) | Configuration for the s3 origin config to be used in dynamic block | `list(map(string))` | `[]` | no |
| [enabled](#input\_enabled) | Whether the distribution is enabled to accept end user requests for content | `bool` | `true` | no |
| [geo\_restriction](#input\_geo\_restriction) | The restriction type of your CloudFront distribution geolocation restriction. Options include none, whitelist, blacklist |object({| `null` | no |
restriction_type = string
locations = list(string)
})
| [http\_version](#input\_http\_version) | The maximum HTTP version to support on the distribution. Allowed values are http1.1 and http2 | `string` | `"http2"` | no |
| [is\_ipv6\_enabled](#input\_is\_ipv6\_enabled) | Whether the IPv6 is enabled for the distribution | `bool` | `true` | no |
| [logging\_config](#input\_logging\_config) | This is the logging configuration for the Cloudfront Distribution. It is not required.
If you choose to use this configuration, be sure you have the correct IAM and Bucket ACL
rules. Your tfvars file should follow this syntax:
logging\_config = {
bucket = ""
include\_cookies =
prefix = ""
} | `map(any)` | `{}` | no |
| [ordered\_cache\_behavior](#input\_ordered\_cache\_behavior) | Ordered Cache Behaviors to be used in dynamic block | `any` | `[]` | no |
| [origin\_groups](#input\_origin\_groups) | Origin Group to be used in dynamic block | `any` | `[]` | no |
| [price\_class](#input\_price\_class) | The price class of the CloudFront Distribution. Valid types are PriceClass\_All, PriceClass\_100, PriceClass\_200 | `string` | `"PriceClass_100"` | no |
| [region](#input\_region) | Target AWS region | `string` | `"us-east-1"` | no |
| [retain\_on\_delete](#input\_retain\_on\_delete) | Disables the distribution instead of deleting it when destroying the resource through Terraform. If this is set, the distribution needs to be deleted manually afterwards. | `bool` | `false` | no |
| [s3\_origin\_config](#input\_s3\_origin\_config) | Configuration for the custom origin config to be used in dynamic block | `any` | `[]` | no |
| [ssl\_support\_method](#input\_ssl\_support\_method) | Specifies how you want CloudFront to serve HTTPS requests. One of vip or sni-only. | `string` | `"sni-only"` | no |
| [tag\_name](#input\_tag\_name) | The tagged name | `string` | `""` | no |
| [tags](#input\_tags) | Map of custom tags for the provisioned resources | `map(string)` | `{}` | no |
| [wait\_for\_deployment](#input\_wait\_for\_deployment) | If enabled, the resource will wait for the distribution status to change from InProgress to Deployed. Setting this tofalse will skip the process. | `bool` | `true` | no |
| [web\_acl\_id](#input\_web\_acl\_id) | The WAF Web ACL | `string` | `""` | no |## Outputs
| Name | Description |
|------|-------------|
| [id](#output\_id) | The identifier for the distribution. For example: EDFDVBD632BHDS5. |
| [name](#output\_name) | The domain name corresponding to the distribution. For example: d604721fxaaqy9.cloudfront.net |