|
| 1 | + |
| 2 | +## Inputs |
| 3 | + |
| 4 | +| Name | Description | Type | Default | Required | |
| 5 | +|------|-------------|:----:|:-----:|:-----:| |
| 6 | +| acm_certificate_arn | Existing ACM Certificate ARN | string | `` | no | |
| 7 | +| aliases | List of FQDN's - Used to set the Alternate Domain Names (CNAMEs) setting on Cloudfront | list | `<list>` | no | |
| 8 | +| allowed_methods | List of allowed methods (e.g. GET, PUT, POST, DELETE, HEAD) for AWS CloudFront | list | `<list>` | no | |
| 9 | +| attributes | Additional attributes (e.g. `policy` or `role`) | list | `<list>` | no | |
| 10 | +| bucket_domain_format | Format of bucket domain name | string | `%s.s3.amazonaws.com` | no | |
| 11 | +| cached_methods | List of cached methods (e.g. GET, PUT, POST, DELETE, HEAD) | list | `<list>` | no | |
| 12 | +| comment | Comment for the origin access identity | string | `Managed by Terraform` | no | |
| 13 | +| compress | Compress content for web requests that include Accept-Encoding: gzip in the request header | string | `false` | no | |
| 14 | +| cors_allowed_headers | List of allowed headers for S3 bucket | list | `<list>` | no | |
| 15 | +| cors_allowed_methods | List of allowed methods (e.g. GET, PUT, POST, DELETE, HEAD) for S3 bucket | list | `<list>` | no | |
| 16 | +| cors_allowed_origins | List of allowed origins (e.g. example.com, test.com) for S3 bucket | list | `<list>` | no | |
| 17 | +| cors_expose_headers | List of expose header in the response for S3 bucket | list | `<list>` | no | |
| 18 | +| cors_max_age_seconds | Time in seconds that browser can cache the response for S3 bucket | string | `3600` | no | |
| 19 | +| default_root_object | Object that CloudFront return when requests the root URL | string | `index.html` | no | |
| 20 | +| default_ttl | Default amount of time (in seconds) that an object is in a CloudFront cache | string | `60` | no | |
| 21 | +| delimiter | Delimiter to be used between `name`, `namespace`, `stage`, etc. | string | `-` | no | |
| 22 | +| enabled | Select Enabled if you want CloudFront to begin processing requests as soon as the distribution is created, or select Disabled if you do not want CloudFront to begin processing requests after the distribution is created. | string | `true` | no | |
| 23 | +| forward_cookies | Time in seconds that browser can cache the response for S3 bucket | string | `none` | no | |
| 24 | +| forward_query_string | Forward query strings to the origin that is associated with this cache behavior | string | `false` | no | |
| 25 | +| geo_restriction_locations | List of country codes for which CloudFront either to distribute content (whitelist) or not distribute your content (blacklist) | list | `<list>` | no | |
| 26 | +| geo_restriction_type | Method that use to restrict distribution of your content by country: `none`, `whitelist`, or `blacklist` | string | `none` | no | |
| 27 | +| is_ipv6_enabled | State of CloudFront IPv6 | string | `true` | no | |
| 28 | +| log_expiration_days | Number of days after which to expunge the objects | string | `90` | no | |
| 29 | +| log_glacier_transition_days | Number of days after which to move the data to the glacier storage tier | string | `60` | no | |
| 30 | +| log_include_cookies | Include cookies in access logs | string | `false` | no | |
| 31 | +| log_prefix | Path of logs in S3 bucket | string | `` | no | |
| 32 | +| log_standard_transition_days | Number of days to persist in the standard storage tier before moving to the glacier tier | string | `30` | no | |
| 33 | +| max_ttl | Maximum amount of time (in seconds) that an object is in a CloudFront cache | string | `31536000` | no | |
| 34 | +| min_ttl | Minimum amount of time that you want objects to stay in CloudFront caches | string | `0` | no | |
| 35 | +| name | Name (e.g. `bastion` or `db`) | string | - | yes | |
| 36 | +| namespace | Namespace (e.g. `cp` or `cloudposse`) | string | - | yes | |
| 37 | +| null | an empty string | string | `` | no | |
| 38 | +| origin_bucket | Name of S3 bucket | string | `` | no | |
| 39 | +| origin_force_destroy | Delete all objects from the bucket so that the bucket can be destroyed without error (e.g. `true` or `false`) | string | `false` | no | |
| 40 | +| origin_path | (Optional) - An optional element that causes CloudFront to request your content from a directory in your Amazon S3 bucket or your custom origin. It must begin with a /. Do not add a / at the end of the path. | string | `` | no | |
| 41 | +| parent_zone_id | ID of the hosted zone to contain this record (or specify `parent_zone_name`) | string | `` | no | |
| 42 | +| parent_zone_name | Name of the hosted zone to contain this record (or specify `parent_zone_id`) | string | `` | no | |
| 43 | +| price_class | Price class for this distribution: `PriceClass_All`, `PriceClass_200`, `PriceClass_100` | string | `PriceClass_100` | no | |
| 44 | +| stage | Stage (e.g. `prod`, `dev`, `staging`) | string | - | yes | |
| 45 | +| static_s3_bucket | aws-cli is a bucket owned by amazon that will perminantly exist It allows for the data source to be called during the destruction process without failing. It doesn't get used for anything else, this is a safe workaround for handling the fact that if a data source like the one `aws_s3_bucket.selected` gets an error, you can't continue the terraform process which also includes the 'destroy' command, where is doesn't even need this data source! Don't change this bucket name, its a variable so that we can provide this description. And this works around a problem that is an edge case. | string | `aws-cli` | no | |
| 46 | +| tags | Additional tags (e.g. map('BusinessUnit`,`XYZ`) | map | `<map>` | no | |
| 47 | +| use_regional_s3_endpoint | When set to 'true' the s3 origin_bucket will use the regional endpoint address instead of the global endpoint address | string | `false` | no | |
| 48 | +| viewer_protocol_policy | allow-all, redirect-to-https | string | `redirect-to-https` | no | |
| 49 | + |
| 50 | +## Outputs |
| 51 | + |
| 52 | +| Name | Description | |
| 53 | +|------|-------------| |
| 54 | +| cf_arn | ARN of AWS CloudFront distribution | |
| 55 | +| cf_domain_name | Domain name corresponding to the distribution | |
| 56 | +| cf_etag | Current version of the distribution's information | |
| 57 | +| cf_hosted_zone_id | CloudFront Route 53 zone ID | |
| 58 | +| cf_id | ID of AWS CloudFront distribution | |
| 59 | +| cf_status | Current status of the distribution | |
| 60 | +| s3_bucket | Name of S3 bucket | |
| 61 | +| s3_bucket_domain_name | Domain of S3 bucket | |
| 62 | + |
0 commit comments