Skip to content

Commit

Permalink
Merge pull request #1449 from alphagov/ianhowell-gds/remove_chat_s3_b…
Browse files Browse the repository at this point in the history
…ucket_lifecycle

Remove S3 lifecycle configuration from chat opensearch snapshot bucket
  • Loading branch information
ianhowell-gds authored Oct 2, 2024
2 parents 93454b8 + 8c32049 commit 9dd69a5
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions terraform/deployments/opensearch/s3.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,32 +32,6 @@ resource "aws_s3_bucket_server_side_encryption_configuration" "opensearch_snapsh
}
}

resource "aws_s3_bucket_lifecycle_configuration" "opensearch_snapshot" {
bucket = aws_s3_bucket.opensearch_snapshot.id
rule {
id = "production"
status = var.govuk_environment == "production" ? "Enabled" : "Disabled"
filter {}
transition {
days = 30
storage_class = "STANDARD_IA"
}
transition {
days = 60
storage_class = "GLACIER"
}
expiration { days = 120 }
noncurrent_version_expiration { noncurrent_days = 1 }
}
rule {
id = "non-production"
status = var.govuk_environment != "production" ? "Enabled" : "Disabled"
filter {}
expiration { days = 2 }
noncurrent_version_expiration { noncurrent_days = 1 }
}
}

resource "aws_s3_bucket_policy" "opensearch_snapshot" {
bucket = aws_s3_bucket.opensearch_snapshot.id
policy = data.aws_iam_policy_document.opensearch_snapshot_bucket_policy.json
Expand Down

0 comments on commit 9dd69a5

Please sign in to comment.