diff --git a/main.tf b/main.tf index 153acc7..8d07d62 100644 --- a/main.tf +++ b/main.tf @@ -65,10 +65,24 @@ resource "aws_s3_bucket" "s3_default" { } } - tags = module.labels.tags + replication_configuration { + role = var.replication-role -} + rules { + id = var.replication-id + priority = var.replication-priority + status = var.replication-status + + destination { + bucket = var.replication-bucket + } + + filter {} + } + + } +} # Module : S3 BUCKET POLICY # Description : Terraform module which creates policy for S3 bucket on AWS resource "aws_s3_bucket_policy" "s3_default" { diff --git a/variables.tf b/variables.tf index 1c234c4..a39d335 100644 --- a/variables.tf +++ b/variables.tf @@ -19,7 +19,7 @@ variable "environment" { } variable "label_order" { - type = list + type = list(any) default = [] description = "Label order, e.g. `name`,`application`." } @@ -31,7 +31,7 @@ variable "managedby" { } variable "attributes" { - type = list + type = list(any) default = [] description = "Additional attributes (e.g. `1`)." } @@ -43,7 +43,7 @@ variable "delimiter" { } variable "tags" { - type = map + type = map(any) default = {} description = "Additional tags (e.g. map(`BusinessUnit`,`XYZ`)." } @@ -207,3 +207,33 @@ variable "force_destroy" { default = false description = "A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable." } + +variable "replication-role" { + type = string + default = "" + description = "" +} + +variable "replication-id" { + type = string + default = "" + description = "A replication id for s3" +} + +variable "replication-priority" { + type = number + default = "" + description = "replication-priority number exp. 0,1,2 etc" +} + +variable "replication-status" { + type = string + default = "" + description = "" +} + +variable "replication-bucket" { + type = string + default = "" + description = "s3 bucket arn for replication bucket " +} \ No newline at end of file