Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
terraform-aws-s3-bucket
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Terraform Modules
terraform-aws-s3-bucket
Commits
fa1defc0
Unverified
Commit
fa1defc0
authored
Nov 07, 2021
by
schniber
Committed by
GitHub
Nov 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: Added Replication Time Control for Bucket Replication (#114)
parent
209fd2f3
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
45 additions
and
17 deletions
+45
-17
.pre-commit-config.yaml
.pre-commit-config.yaml
+4
-4
README.md
README.md
+2
-2
README.md
examples/s3-replication/README.md
+3
-3
main.tf
examples/s3-replication/main.tf
+9
-1
versions.tf
examples/s3-replication/versions.tf
+1
-1
main.tf
main.tf
+18
-0
versions.tf
versions.tf
+1
-1
README.md
wrappers/README.md
+1
-1
main.tf
wrappers/main.tf
+2
-0
README.md
wrappers/notification/README.md
+2
-2
README.md
wrappers/object/README.md
+2
-2
No files found.
.pre-commit-config.yaml
View file @
fa1defc0
...
...
@@ -16,8 +16,8 @@ repos:
# entry: /Users/Bob/Sites/terraform-aws-modules/scripts/generate-terraform-wrappers.sh --module-dir modules/notification --overwrite
# language: system
# pass_filenames: false
-
repo
:
git
://github.com/antonbabenko/pre-commit-terraform
rev
:
v1.5
0
.0
-
repo
:
https
://github.com/antonbabenko/pre-commit-terraform
rev
:
v1.5
5
.0
hooks
:
-
id
:
terraform_fmt
-
id
:
terraform_validate
...
...
@@ -37,7 +37,7 @@ repos:
-
'
--args=--only=terraform_required_providers'
-
'
--args=--only=terraform_standard_module_structure'
-
'
--args=--only=terraform_workspace_remote'
-
repo
:
git
://github.com/pre-commit/pre-commit-hooks
rev
:
v
3.4.0
-
repo
:
https
://github.com/pre-commit/pre-commit-hooks
rev
:
v
4.0.1
hooks
:
-
id
:
check-merge-conflict
README.md
View file @
fa1defc0
...
...
@@ -108,13 +108,13 @@ inputs = {
| Name | Version |
|------|---------|
|
<a
name=
"requirement_terraform"
></a>
[
terraform
](
#requirement\_terraform
)
| >= 0.13.1 |
|
<a
name=
"requirement_aws"
></a>
[
aws
](
#requirement\_aws
)
| >= 3.
50
|
|
<a
name=
"requirement_aws"
></a>
[
aws
](
#requirement\_aws
)
| >= 3.
64
|
## Providers
| Name | Version |
|------|---------|
|
<a
name=
"provider_aws"
></a>
[
aws
](
#provider\_aws
)
| >= 3.
50
|
|
<a
name=
"provider_aws"
></a>
[
aws
](
#provider\_aws
)
| >= 3.
64
|
## Modules
...
...
examples/s3-replication/README.md
View file @
fa1defc0
...
...
@@ -22,15 +22,15 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Version |
|------|---------|
|
<a
name=
"requirement_terraform"
></a>
[
terraform
](
#requirement\_terraform
)
| >= 0.13.1 |
|
<a
name=
"requirement_aws"
></a>
[
aws
](
#requirement\_aws
)
| >= 3.
50
|
|
<a
name=
"requirement_aws"
></a>
[
aws
](
#requirement\_aws
)
| >= 3.
64
|
|
<a
name=
"requirement_random"
></a>
[
random
](
#requirement\_random
)
| >= 2.0 |
## Providers
| Name | Version |
|------|---------|
|
<a
name=
"provider_aws"
></a>
[
aws
](
#provider\_aws
)
| >= 3.
50
|
|
<a
name=
"provider_aws.replica"
></a>
[
aws.replica
](
#provider\_aws.replica
)
| >= 3.
50
|
|
<a
name=
"provider_aws"
></a>
[
aws
](
#provider\_aws
)
| >= 3.
64
|
|
<a
name=
"provider_aws.replica"
></a>
[
aws.replica
](
#provider\_aws.replica
)
| >= 3.
64
|
|
<a
name=
"provider_random"
></a>
[
random
](
#provider\_random
)
| >= 2.0 |
## Modules
...
...
examples/s3-replication/main.tf
View file @
fa1defc0
...
...
@@ -83,6 +83,14 @@ module "s3_bucket" {
access_control_translation
=
{
owner
=
"Destination"
}
replication_time
=
{
status
=
"Enabled"
minutes
=
15
}
metrics
=
{
status
=
"Enabled"
minutes
=
15
}
}
},
{
...
...
@@ -128,4 +136,4 @@ module "s3_bucket" {
]
}
}
}
\ No newline at end of file
examples/s3-replication/versions.tf
View file @
fa1defc0
...
...
@@ -2,7 +2,7 @@ terraform {
required_version
=
">= 0.13.1"
required_providers
{
aws
=
">= 3.
50
"
aws
=
">= 3.
64
"
random
=
">= 2.0"
}
}
main.tf
View file @
fa1defc0
...
...
@@ -154,6 +154,24 @@ resource "aws_s3_bucket" "this" {
owner
=
access_control_translation
.
value
.
owner
}
}
dynamic
"replication_time"
{
for_each
=
length
(
keys
(
lookup
(
destination
.
value
,
"replication_time"
,
{}
)))
==
0
?
[]
:
[
lookup
(
destination
.
value
,
"replication_time"
,
{}
)
]
content
{
status
=
replication_time
.
value
.
status
minutes
=
replication_time
.
value
.
minutes
}
}
dynamic
"metrics"
{
for_each
=
length
(
keys
(
lookup
(
destination
.
value
,
"metrics"
,
{}
)))
==
0
?
[]
:
[
lookup
(
destination
.
value
,
"metrics"
,
{}
)
]
content
{
status
=
metrics
.
value
.
status
minutes
=
metrics
.
value
.
minutes
}
}
}
}
...
...
versions.tf
View file @
fa1defc0
...
...
@@ -2,6 +2,6 @@ terraform {
required_version
=
">= 0.13.1"
required_providers
{
aws
=
">= 3.
50
"
aws
=
">= 3.
64
"
}
}
wrappers/README.md
View file @
fa1defc0
...
...
@@ -28,7 +28,7 @@ inputs = {
}
```
## Usage with Terraform
:
## Usage with Terraform
```
hcl
module
"wrapper"
{
...
...
wrappers/main.tf
View file @
fa1defc0
...
...
@@ -30,4 +30,6 @@ module "wrapper" {
block_public_policy
=
lookup
(
each
.
value
,
"block_public_policy"
,
false
)
ignore_public_acls
=
lookup
(
each
.
value
,
"ignore_public_acls"
,
false
)
restrict_public_buckets
=
lookup
(
each
.
value
,
"restrict_public_buckets"
,
false
)
control_object_ownership
=
lookup
(
each
.
value
,
"control_object_ownership"
,
false
)
object_ownership
=
lookup
(
each
.
value
,
"object_ownership"
,
"ObjectWriter"
)
}
wrappers/notification/README.md
View file @
fa1defc0
...
...
@@ -6,7 +6,7 @@ You may want to use a single Terragrunt configuration file to manage multiple re
This wrapper does not implement any extra functionality.
# Usage with Terragrunt
#
#
Usage with Terragrunt
`terragrunt.hcl`
:
...
...
@@ -28,7 +28,7 @@ inputs = {
}
```
## Usage with Terraform
:
## Usage with Terraform
```
hcl
module
"wrapper"
{
...
...
wrappers/object/README.md
View file @
fa1defc0
...
...
@@ -6,7 +6,7 @@ You may want to use a single Terragrunt configuration file to manage multiple re
This wrapper does not implement any extra functionality.
# Usage with Terragrunt
#
#
Usage with Terragrunt
`terragrunt.hcl`
:
...
...
@@ -28,7 +28,7 @@ inputs = {
}
```
## Usage with Terraform
:
## Usage with Terraform
```
hcl
module
"wrapper"
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment