Skip to content
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

feat: Add support for aws provider 5.0 #280

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 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
1 change: 1 addition & 0 deletions .github/workflows/release-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- 'docs/**'
- 'examples/**'
- 'test/**'
- 'README.*'

permissions:
contents: write
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ Available targets:
| Name | Source | Version |
|------|--------|---------|
| <a name="module_dns"></a> [dns](#module\_dns) | cloudposse/route53-alias/aws | 0.13.0 |
| <a name="module_logs"></a> [logs](#module\_logs) | cloudposse/s3-log-storage/aws | 0.26.0 |
| <a name="module_logs"></a> [logs](#module\_logs) | cloudposse/s3-log-storage/aws | 1.4.0 |
| <a name="module_origin_label"></a> [origin\_label](#module\_origin\_label) | cloudposse/label/null | 0.25.0 |
| <a name="module_this"></a> [this](#module\_this) | cloudposse/label/null | 0.25.0 |

Expand Down
2 changes: 1 addition & 1 deletion docs/terraform.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
| Name | Source | Version |
|------|--------|---------|
| <a name="module_dns"></a> [dns](#module\_dns) | cloudposse/route53-alias/aws | 0.13.0 |
| <a name="module_logs"></a> [logs](#module\_logs) | cloudposse/s3-log-storage/aws | 0.26.0 |
| <a name="module_logs"></a> [logs](#module\_logs) | cloudposse/s3-log-storage/aws | 1.4.0 |
| <a name="module_origin_label"></a> [origin\_label](#module\_origin\_label) | cloudposse/label/null | 0.25.0 |
| <a name="module_this"></a> [this](#module\_this) | cloudposse/label/null | 0.25.0 |

Expand Down
2 changes: 1 addition & 1 deletion examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ data "aws_canonical_user_id" "current" {

module "s3_bucket" {
source = "cloudposse/s3-bucket/aws"
version = "0.36.0"
version = "3.1.1"

acl = null
force_destroy = true
Expand Down
4 changes: 2 additions & 2 deletions examples/complete/s3-origins.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ locals {

module "additional_s3_origin" {
source = "cloudposse/s3-bucket/aws"
version = "0.39.0"
version = "3.1.1"
MaxymVlasov marked this conversation as resolved.
Show resolved Hide resolved
enabled = local.additional_s3_origins_enabled

acl = "private"
Expand All @@ -43,7 +43,7 @@ module "additional_s3_origin" {

module "additional_s3_failover_origin" {
source = "cloudposse/s3-bucket/aws"
version = "0.39.0"
version = "3.1.1"
MaxymVlasov marked this conversation as resolved.
Show resolved Hide resolved
enabled = local.additional_s3_origins_enabled

acl = "private"
Expand Down
10 changes: 5 additions & 5 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ locals {
# https://github.com/hashicorp/terraform-provider-template/issues/85
# https://github.com/hashicorp/terraform/issues/26838
locals {
override_policy = replace(replace(replace(var.additional_bucket_policy,
override_policies = [replace(replace(replace(var.additional_bucket_policy,
"$${origin_path}", local.origin_path),
"$${bucket_name}", local.bucket),
"$${cloudfront_origin_access_identity_iam_arn}", local.cf_access.arn)
"$${cloudfront_origin_access_identity_iam_arn}", local.cf_access.arn)]
}

data "aws_partition" "current" {
Expand Down Expand Up @@ -133,7 +133,7 @@ resource "random_password" "referer" {
data "aws_iam_policy_document" "s3_origin" {
count = local.s3_origin_enabled ? 1 : 0

override_json = local.override_policy
override_policy_documents = local.override_policies

statement {
sid = "S3GetObjectForCloudFront"
Expand Down Expand Up @@ -163,7 +163,7 @@ data "aws_iam_policy_document" "s3_origin" {
data "aws_iam_policy_document" "s3_website_origin" {
count = local.website_enabled ? 1 : 0

override_json = local.override_policy
override_policy_documents = local.override_policies

statement {
sid = "S3GetObjectForCloudFront"
Expand Down Expand Up @@ -342,7 +342,7 @@ resource "time_sleep" "wait_for_aws_s3_bucket_settings" {

module "logs" {
source = "cloudposse/s3-log-storage/aws"
version = "0.26.0"
version = "1.4.0"
MaxymVlasov marked this conversation as resolved.
Show resolved Hide resolved
enabled = local.create_cf_log_bucket
attributes = var.extra_logs_attributes
lifecycle_prefix = local.cloudfront_access_log_prefix
Expand Down