https://github.com/zkfmapf123/terraform-static-cloudfront
terraform-static-cloudfront
https://github.com/zkfmapf123/terraform-static-cloudfront
Last synced: 3 months ago
JSON representation
terraform-static-cloudfront
- Host: GitHub
- URL: https://github.com/zkfmapf123/terraform-static-cloudfront
- Owner: zkfmapf123
- Created: 2023-08-26T05:06:26.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-08-27T03:20:47.000Z (almost 3 years ago)
- Last Synced: 2025-08-10T04:35:03.882Z (11 months ago)
- Language: HCL
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Terraform-Static-Cloudfront
- Terraform module which creates Cloudfront + S3 use Deploy Static-Site
## Usage
```
module "static-site" {
source = "../../"
## Commomn
common_name = "dk-example"
env = "common"
## S3
s3_is_versioning = true
s3_acl = "private" // 변경은 자제...
s3_cors_rule = {
allowed_headers = ["*"]
allowed_methods = ["PUT", "GET", "POST"]
allowed_origins = ["*"]
expose_headers = ["ETag"]
max_age_seconds = 3000
}
s3_source = "./common/index.html"
s3_website = {
index = "index.html"
error = "error.html"
}
## Cloudfront
cf_acm = null
cf_enabled = true
cf_is_ipv6 = false
cf_comment = "example cloudfront static-site"
cf_default_object = "index.html"
cf_alias = []
cf_waf_id = null
## Cloudfront-origin
cf_origin_attempts = 3
cf_origin_timeout = 10
## Cloudfront-cache
cf_caching_policy_name = "Managed-CachingOptimized"
cf_caching_allow_methods = ["GET", "HEAD", "OPTIONS"]
cf_caching_cache_methods = ["GET", "HEAD"]
cf_caching_viewer_policy = "allow-all"
cf_caching_ttl = {
default_ttl = 0
min_ttl = 0
max_ttl = 0
}
## geo
cf_geo_restriction_type = "none"
cf_geo_restriction_locations = null
## viwer
cf_viewer_acm_arn = null
cf_minimum_protocol_version = null
cf_ssl_support_method = null
}
```
## Desc
- Cloudfront + S3 Deploy use Static Site
## Example
## Reference
- vars.tf 참고
- Terraform Module Site