Skip to content

Commit 112c75d

Browse files
authored
Support AWS v4 provider (#71)
1 parent 2c17ca6 commit 112c75d

21 files changed

+648
-173
lines changed

.github/.github-update-disabled

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/renovate.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
11
{
2-
"enabled": false
2+
"extends": [
3+
"config:base",
4+
":preserveSemverRanges"
5+
],
6+
"labels": ["auto-update"],
7+
"enabledManagers": ["terraform"],
8+
"terraform": {
9+
"ignorePaths": ["**/context.tf", "examples/**"]
10+
}
311
}
12+

.github/workflows/auto-context.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
3636
- name: Create Pull Request
3737
if: steps.update.outputs.create_pull_request == 'true'
38-
uses: cloudposse/actions/github/create-pull-request@0.22.0
38+
uses: cloudposse/actions/github/create-pull-request@0.30.0
3939
with:
4040
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
4141
committer: 'cloudpossebot <[email protected]>'

.github/workflows/auto-format.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
fi
6363
6464
- name: Auto Test
65-
uses: cloudposse/actions/github/repository-dispatch@0.22.0
65+
uses: cloudposse/actions/github/repository-dispatch@0.30.0
6666
# match users by ID because logins (user names) are inconsistent,
6767
# for example in the REST API Renovate Bot is `renovate[bot]` but
6868
# in GraphQL it is just `renovate`, plus there is a non-bot

.github/workflows/chatops.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
steps:
1010
- uses: actions/checkout@v2
1111
- name: "Handle common commands"
12-
uses: cloudposse/actions/github/slash-command-dispatch@0.22.0
12+
uses: cloudposse/actions/github/slash-command-dispatch@0.30.0
1313
with:
1414
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
1515
reaction-token: ${{ secrets.GITHUB_TOKEN }}
@@ -24,7 +24,7 @@ jobs:
2424
- name: "Checkout commit"
2525
uses: actions/checkout@v2
2626
- name: "Run tests"
27-
uses: cloudposse/actions/github/slash-command-dispatch@0.22.0
27+
uses: cloudposse/actions/github/slash-command-dispatch@0.30.0
2828
with:
2929
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
3030
reaction-token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Compiled files
22
*.tfstate
3-
*.tfstate.backup
3+
*.tfstate.backup*
44
*.lock.info
55
**/.terraform.lock.hcl
66

README.md

Lines changed: 71 additions & 18 deletions
Large diffs are not rendered by default.

README.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,54 @@ usage: |-
9292
expiration_days = 90
9393
}
9494
```
95+
96+
This module supports full S3 [storage lifecycle](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html) configuration:
97+
98+
```hcl
99+
locals {
100+
lifecycle_configuration_rule = {
101+
enabled = true # bool
102+
id = "v2rule"
103+
104+
abort_incomplete_multipart_upload_days = 1 # number
105+
106+
filter_and = null
107+
expiration = {
108+
days = 120 # integer > 0
109+
}
110+
noncurrent_version_expiration = {
111+
newer_noncurrent_versions = 3 # integer > 0
112+
noncurrent_days = 60 # integer >= 0
113+
}
114+
transition = [{
115+
days = 30 # integer >= 0
116+
storage_class = "STANDARD_IA" # string/enum, one of GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE, GLACIER_IR.
117+
},
118+
{
119+
days = 60 # integer >= 0
120+
storage_class = "ONEZONE_IA" # string/enum, one of GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE, GLACIER_IR.
121+
}]
122+
noncurrent_version_transition = [{
123+
newer_noncurrent_versions = 3 # integer >= 0
124+
noncurrent_days = 30 # integer >= 0
125+
storage_class = "ONEZONE_IA" # string/enum, one of GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE, GLACIER_IR.
126+
}]
127+
}
128+
}
129+
130+
module "log_storage" {
131+
source = "cloudposse/s3-log-storage/aws"
132+
# Cloud Posse recommends pinning every module to a specific version
133+
# version = "x.x.x"
134+
name = "logs"
135+
stage = "test"
136+
namespace = "eg"
137+
138+
lifecycle_configuration_rules = [var.lifecycle_configuration_rule]
139+
}
140+
141+
```
142+
95143
include:
96144
- docs/targets.md
97145
- docs/terraform.md

docs/terraform.md

Lines changed: 24 additions & 18 deletions
Large diffs are not rendered by default.

examples/complete/fixtures.us-east-2.tfvars

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,25 @@ stage = "test"
77
name = "s3-log-storage"
88

99
allow_ssl_requests_only = true
10+
11+
lifecycle_configuration_rules = [
12+
{
13+
enabled = true # bool
14+
id = "v2rule"
15+
16+
abort_incomplete_multipart_upload_days = 1 # number
17+
18+
filter_and = null
19+
expiration = null
20+
transition = null
21+
noncurrent_version_expiration = {
22+
newer_noncurrent_versions = 3 # integer > 0
23+
noncurrent_days = 90 # integer >= 0
24+
}
25+
noncurrent_version_transition = [{
26+
newer_noncurrent_versions = 3 # integer >= 0
27+
noncurrent_days = 30 # integer >= 0
28+
storage_class = "ONEZONE_IA" # string/enum, one of GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE, GLACIER_IR.
29+
}]
30+
}
31+
]

0 commit comments

Comments
 (0)