Skip to content

[Automated Update][terraform-aws-static-assets] v0.20.4 release #2509

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ import VersionBadge from '../../../../../src/components/VersionBadge.tsx';
import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue, HclGeneralListItem } from '../../../../../src/components/HclListItem.tsx';
import { ModuleUsage } from "../../../../../src/components/ModuleUsage";

<VersionBadge repoTitle="Static Assets Modules" version="0.20.3" lastModifiedVersion="0.20.3"/>
<VersionBadge repoTitle="Static Assets Modules" version="0.20.4" lastModifiedVersion="0.20.4"/>

# CloudFront Module

<a href="https://github.com/gruntwork-io/terraform-aws-static-assets/tree/v0.20.3/modules/cloudfront" className="link-button" title="View the source code for this module in GitHub.">View Source</a>
<a href="https://github.com/gruntwork-io/terraform-aws-static-assets/tree/v0.20.4/modules/cloudfront" className="link-button" title="View the source code for this module in GitHub.">View Source</a>

<a href="https://github.com/gruntwork-io/terraform-aws-static-assets/releases/tag/v0.20.3" className="link-button" title="Release notes for only versions which impacted this module.">Release Notes</a>
<a href="https://github.com/gruntwork-io/terraform-aws-static-assets/releases/tag/v0.20.4" className="link-button" title="Release notes for only versions which impacted this module.">Release Notes</a>

This module deploys an [AWS CloudFront](https://aws.amazon.com/cloudfront/) distribution to serve content from S3 or custom origins. CloudFront is a Content Delivery Network (CDN) that caches your content at edge locations around the world to reduce latency and improve performance for your users.

## Quick Start

* See the [cloudfront-custom-origin](https://github.com/gruntwork-io/terraform-aws-static-assets/tree/v0.20.3/examples/cloudfront) example for working sample code.
* Check out [vars.tf](https://github.com/gruntwork-io/terraform-aws-static-assets/tree/v0.20.3/modules/cloudfront/vars.tf) for all parameters you can set for this module.
* See the [cloudfront-custom-origin](https://github.com/gruntwork-io/terraform-aws-static-assets/tree/v0.20.4/examples/cloudfront) example for working sample code.
* Check out [vars.tf](https://github.com/gruntwork-io/terraform-aws-static-assets/tree/v0.20.4/modules/cloudfront/vars.tf) for all parameters you can set for this module.

## Sample Usage

Expand All @@ -37,7 +37,7 @@ This module deploys an [AWS CloudFront](https://aws.amazon.com/cloudfront/) dist

module "cloudfront" {

source = "git::[email protected]:gruntwork-io/terraform-aws-static-assets.git//modules/cloudfront?ref=v0.20.3"
source = "git::[email protected]:gruntwork-io/terraform-aws-static-assets.git//modules/cloudfront?ref=v0.20.4"

# ----------------------------------------------------------------------------------------------------
# REQUIRED VARIABLES
Expand Down Expand Up @@ -228,10 +228,10 @@ module "cloudfront" {
# Any comments you want to include about the distribution.
comment = null

# continuous deployment policy. This argument should only be set on a
# production distribution. See the aws_cloudfront_continuous_deployment_policy
# resource for additional details.
continuous_deployment_policy = {"is_continuous_deployment_policy_enabled":false}
# continuous deployment policy. This argument should only be set on a STAGING
# distribution. See the aws_cloudfront_continuous_deployment_policy resource
# for additional details.
continuous_deployment_policy = null

# One or more custom error response elements.
custom_error_response = []
Expand All @@ -247,6 +247,12 @@ module "cloudfront" {
# Whether the distribution is enabled to accept end user requests for content.
enabled = true

# The ID of the continuous deployment policy to associate with the
# distribution. This argument should only be set on a production distribution.
# See the aws_cloudfront_continuous_deployment_policy resource for additional
# details.
existing_continuous_deployment_policy_id = null

# The restriction configuration for this distribution (geo_restrictions)
geo_restriction = [{"locations":[],"restriction_type":"none"}]

Expand Down Expand Up @@ -319,7 +325,7 @@ module "cloudfront" {
# ------------------------------------------------------------------------------------------------------

terraform {
source = "git::[email protected]:gruntwork-io/terraform-aws-static-assets.git//modules/cloudfront?ref=v0.20.3"
source = "git::[email protected]:gruntwork-io/terraform-aws-static-assets.git//modules/cloudfront?ref=v0.20.4"
}

inputs = {
Expand Down Expand Up @@ -513,10 +519,10 @@ inputs = {
# Any comments you want to include about the distribution.
comment = null

# continuous deployment policy. This argument should only be set on a
# production distribution. See the aws_cloudfront_continuous_deployment_policy
# resource for additional details.
continuous_deployment_policy = {"is_continuous_deployment_policy_enabled":false}
# continuous deployment policy. This argument should only be set on a STAGING
# distribution. See the aws_cloudfront_continuous_deployment_policy resource
# for additional details.
continuous_deployment_policy = null

# One or more custom error response elements.
custom_error_response = []
Expand All @@ -532,6 +538,12 @@ inputs = {
# Whether the distribution is enabled to accept end user requests for content.
enabled = true

# The ID of the continuous deployment policy to associate with the
# distribution. This argument should only be set on a production distribution.
# See the aws_cloudfront_continuous_deployment_policy resource for additional
# details.
existing_continuous_deployment_policy_id = null

# The restriction configuration for this distribution (geo_restrictions)
geo_restriction = [{"locations":[],"restriction_type":"none"}]

Expand Down Expand Up @@ -1941,25 +1953,13 @@ Any comments you want to include about the distribution.
<HclListItem name="continuous_deployment_policy" requirement="optional" type="object(…)">
<HclListItemDescription>

continuous deployment policy. This argument should only be set on a production distribution. See the aws_cloudfront_continuous_deployment_policy resource for additional details.
continuous deployment policy. This argument should only be set on a STAGING distribution. See the aws_cloudfront_continuous_deployment_policy resource for additional details.

</HclListItemDescription>
<HclListItemTypeDetails>

```hcl
object({
# Flag to enable continuous deployment policy.
is_continuous_deployment_policy_enabled = bool

# CloudFront domain name of the staging distribution.
staging_distribution_dns_names = optional(object({
# A list of CloudFront domain names for the staging distribution.
items = list(string)

# Number of CloudFront domain names in the staging distribution.
quantity = number
}))

# Parameters for routing production traffic from primary to staging distributions.
traffic_config = optional(object({
# Type of traffic configuration. Valid values are SingleWeight and SingleHeader.
Expand Down Expand Up @@ -1997,49 +1997,11 @@ object({
```

</HclListItemTypeDetails>
<HclListItemDefaultValue>

```hcl
{
is_continuous_deployment_policy_enabled = false
}
```

</HclListItemDefaultValue>
<HclListItemDefaultValue defaultValue="null"/>
<HclGeneralListItem title="More Details">
<details>


```hcl

CloudFront domain name of the staging distribution.

```
</details>

<details>


```hcl

Number of CloudFront domain names in the staging distribution.

```
</details>

<details>


```hcl

Parameters for routing production traffic from primary to staging distributions.

```
</details>

<details>


```hcl

Determines which HTTP requests are sent to the staging distribution.
Expand Down Expand Up @@ -2195,6 +2157,15 @@ Whether the distribution is enabled to accept end user requests for content.
<HclListItemDefaultValue defaultValue="true"/>
</HclListItem>

<HclListItem name="existing_continuous_deployment_policy_id" requirement="optional" type="string">
<HclListItemDescription>

The ID of the continuous deployment policy to associate with the distribution. This argument should only be set on a production distribution. See the aws_cloudfront_continuous_deployment_policy resource for additional details.

</HclListItemDescription>
<HclListItemDefaultValue defaultValue="null"/>
</HclListItem>

<HclListItem name="geo_restriction" requirement="optional" type="list(object(…))">
<HclListItemDescription>

Expand Down Expand Up @@ -2876,17 +2847,20 @@ Unique identifier that specifies the AWS WAF web ACL, if any, to associate with
<HclListItem name="cloudfront_distribution">
</HclListItem>

<HclListItem name="cloudfront_distribution_continuous_deployment_policy">
</HclListItem>

</TabItem>
</Tabs>

<!-- ##DOCS-SOURCER-START
{
"originalSources": [
"https://github.com/gruntwork-io/terraform-aws-static-assets/tree/v0.20.3/modules/cloudfront/readme.md",
"https://github.com/gruntwork-io/terraform-aws-static-assets/tree/v0.20.3/modules/cloudfront/variables.tf",
"https://github.com/gruntwork-io/terraform-aws-static-assets/tree/v0.20.3/modules/cloudfront/outputs.tf"
"https://github.com/gruntwork-io/terraform-aws-static-assets/tree/v0.20.4/modules/cloudfront/readme.md",
"https://github.com/gruntwork-io/terraform-aws-static-assets/tree/v0.20.4/modules/cloudfront/variables.tf",
"https://github.com/gruntwork-io/terraform-aws-static-assets/tree/v0.20.4/modules/cloudfront/outputs.tf"
],
"sourcePlugin": "module-catalog-api",
"hash": "6a64ca6a4e980acfe29f5c81e7ed0230"
"hash": "7f710fcfa4d0c857889993cc5dc91ad4"
}
##DOCS-SOURCER-END -->
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@ import VersionBadge from '../../../../../src/components/VersionBadge.tsx';
import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue, HclGeneralListItem } from '../../../../../src/components/HclListItem.tsx';
import { ModuleUsage } from "../../../../../src/components/ModuleUsage";

<VersionBadge repoTitle="Static Assets Modules" version="0.20.3" lastModifiedVersion="0.18.5"/>
<VersionBadge repoTitle="Static Assets Modules" version="0.20.4" lastModifiedVersion="0.18.5"/>

# S3 CloudFront Module

<a href="https://github.com/gruntwork-io/terraform-aws-static-assets/tree/v0.20.3/modules/s3-cloudfront" className="link-button" title="View the source code for this module in GitHub.">View Source</a>
<a href="https://github.com/gruntwork-io/terraform-aws-static-assets/tree/v0.20.4/modules/s3-cloudfront" className="link-button" title="View the source code for this module in GitHub.">View Source</a>

<a href="https://github.com/gruntwork-io/terraform-aws-static-assets/releases/tag/v0.18.5" className="link-button" title="Release notes for only versions which impacted this module.">Release Notes</a>

This module deploys a [CloudFront](https://aws.amazon.com/cloudfront/) distribution as a Content Distribution Network
(CDN) in front of an [S3 bucket](https://aws.amazon.com/s3/). This reduces latency for your users, by caching your
static content in servers around the world. It also allows you to use SSL with the static content in an S3 bucket.

See the [s3-static-website module](https://github.com/gruntwork-io/terraform-aws-static-assets/tree/v0.20.3/modules/s3-static-website) for how to deploy static content in an S3 bucket.
See the [s3-static-website module](https://github.com/gruntwork-io/terraform-aws-static-assets/tree/v0.20.4/modules/s3-static-website) for how to deploy static content in an S3 bucket.

## Quick Start

* See the [cloudfront-s3-public](https://github.com/gruntwork-io/terraform-aws-static-assets/tree/v0.20.3/examples/cloudfront-s3-public) and
[cloudfront-s3-private](https://github.com/gruntwork-io/terraform-aws-static-assets/tree/v0.20.3/examples/cloudfront-s3-private) examples for working sample code.
* Check out [vars.tf](https://github.com/gruntwork-io/terraform-aws-static-assets/tree/v0.20.3/modules/s3-cloudfront/vars.tf) for all parameters you can set for this module.
* See the [cloudfront-s3-public](https://github.com/gruntwork-io/terraform-aws-static-assets/tree/v0.20.4/examples/cloudfront-s3-public) and
[cloudfront-s3-private](https://github.com/gruntwork-io/terraform-aws-static-assets/tree/v0.20.4/examples/cloudfront-s3-private) examples for working sample code.
* Check out [vars.tf](https://github.com/gruntwork-io/terraform-aws-static-assets/tree/v0.20.4/modules/s3-cloudfront/vars.tf) for all parameters you can set for this module.

## Public vs private S3 buckets

Expand Down Expand Up @@ -130,7 +130,7 @@ most use cases, but is not particularly flexible. In particular, the limitations
* Only one default cache behavior is supported
([cache behaviors](https://www.terraform.io/docs/providers/aws/r/cloudfront_distribution.html#cache-behavior-arguments)
is an inline block). You can control the default cache settings using a number of parameters, including
`cached_methods`, `default_ttl`, `min_ttl`, `max_ttl`, and many others (see [vars.tf](https://github.com/gruntwork-io/terraform-aws-static-assets/tree/v0.20.3/modules/s3-cloudfront/vars.tf) for the full list).
`cached_methods`, `default_ttl`, `min_ttl`, `max_ttl`, and many others (see [vars.tf](https://github.com/gruntwork-io/terraform-aws-static-assets/tree/v0.20.4/modules/s3-cloudfront/vars.tf) for the full list).

* Only two error responses are supported
([error responses](https://www.terraform.io/docs/providers/aws/r/cloudfront_distribution.html#custom-error-response-arguments)
Expand Down Expand Up @@ -162,7 +162,7 @@ into your own codebase, using it as a guide, and adding the tweaks you need.

module "s_3_cloudfront" {

source = "git::[email protected]:gruntwork-io/terraform-aws-static-assets.git//modules/s3-cloudfront?ref=v0.20.3"
source = "git::[email protected]:gruntwork-io/terraform-aws-static-assets.git//modules/s3-cloudfront?ref=v0.20.4"

# ----------------------------------------------------------------------------------------------------
# REQUIRED VARIABLES
Expand Down Expand Up @@ -479,7 +479,7 @@ module "s_3_cloudfront" {
# ------------------------------------------------------------------------------------------------------

terraform {
source = "git::[email protected]:gruntwork-io/terraform-aws-static-assets.git//modules/s3-cloudfront?ref=v0.20.3"
source = "git::[email protected]:gruntwork-io/terraform-aws-static-assets.git//modules/s3-cloudfront?ref=v0.20.4"
}

inputs = {
Expand Down Expand Up @@ -1517,11 +1517,11 @@ If you have specified whitelist in <a href="#forward_cookies"><code>forward_cook
<!-- ##DOCS-SOURCER-START
{
"originalSources": [
"https://github.com/gruntwork-io/terraform-aws-static-assets/tree/v0.20.3/modules/s3-cloudfront/readme.md",
"https://github.com/gruntwork-io/terraform-aws-static-assets/tree/v0.20.3/modules/s3-cloudfront/variables.tf",
"https://github.com/gruntwork-io/terraform-aws-static-assets/tree/v0.20.3/modules/s3-cloudfront/outputs.tf"
"https://github.com/gruntwork-io/terraform-aws-static-assets/tree/v0.20.4/modules/s3-cloudfront/readme.md",
"https://github.com/gruntwork-io/terraform-aws-static-assets/tree/v0.20.4/modules/s3-cloudfront/variables.tf",
"https://github.com/gruntwork-io/terraform-aws-static-assets/tree/v0.20.4/modules/s3-cloudfront/outputs.tf"
],
"sourcePlugin": "module-catalog-api",
"hash": "407949008087dc20ae59dc8dd378fd0e"
"hash": "f93e952c4a1b370533344705c7472eca"
}
##DOCS-SOURCER-END -->
Loading