Skip to content

Commit 4df2108

Browse files
committed
tidy
1 parent b4fdc78 commit 4df2108

File tree

3 files changed

+0
-22
lines changed

3 files changed

+0
-22
lines changed

terraform/redis_sync_lambda.tf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,6 @@ resource "aws_cloudwatch_log_group" "redis_sync_log_group" {
253253

254254
# S3 Bucket notification to trigger Lambda function for config bucket
255255
resource "aws_s3_bucket_notification" "config_lambda_notification" {
256-
# For now, only create a trigger in internal-dev and prod as those are the envs with a config bucket
257-
# count = local.create_config_bucket ? 1 : 0
258256

259257
bucket = aws_s3_bucket.batch_config_bucket.bucket
260258

@@ -266,7 +264,6 @@ resource "aws_s3_bucket_notification" "config_lambda_notification" {
266264

267265
# Permission for the new S3 bucket to invoke the Lambda function
268266
resource "aws_lambda_permission" "new_s3_invoke_permission" {
269-
# count = local.create_config_bucket ? 1 : 0
270267

271268
statement_id = "AllowExecutionFromNewS3"
272269
action = "lambda:InvokeFunction"

terraform/s3_config.tf

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -192,15 +192,10 @@ resource "aws_s3_bucket_lifecycle_configuration" "data_destinations" {
192192
}
193193

194194
resource "aws_s3_bucket" "batch_config_bucket" {
195-
# For now, only create in internal-dev and prod as we only have one shared Redis instance per account.
196-
# count = local.create_config_bucket ? 1 : 0
197-
198195
bucket = "imms-${local.environment}-supplier-config"
199196
}
200197

201198
resource "aws_s3_bucket_public_access_block" "batch_config_bucket_public_access_block" {
202-
# count = local.create_config_bucket ? 1 : 0
203-
204199
bucket = aws_s3_bucket.batch_config_bucket.id
205200

206201
block_public_acls = true
@@ -210,8 +205,6 @@ resource "aws_s3_bucket_public_access_block" "batch_config_bucket_public_access_
210205
}
211206

212207
resource "aws_s3_bucket_policy" "batch_config_bucket_policy" {
213-
# count = local.create_config_bucket ? 1 : 0
214-
215208
bucket = aws_s3_bucket.batch_config_bucket.id
216209

217210
policy = jsonencode({

terraform/variables.tf

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@ locals {
2727
project_domain_name = data.aws_route53_zone.project_zone.name
2828
service_domain_name = "${local.env}.${local.project_domain_name}"
2929

30-
# For now, only create the config bucket in internal-dev and prod as we only have one Redis instance per account.
31-
# create_config_bucket = local.environment == local.config_bucket_env
32-
# config_bucket_arn = local.create_config_bucket ? aws_s3_bucket.batch_config_bucket[0].arn : data.aws_s3_bucket.existing_config_bucket[0].arn
33-
# config_bucket_name = local.create_config_bucket ? aws_s3_bucket.batch_config_bucket[0].bucket : data.aws_s3_bucket.existing_config_bucket[0].bucket
34-
3530
config_bucket_arn = aws_s3_bucket.batch_config_bucket.arn
3631
config_bucket_name = aws_s3_bucket.batch_config_bucket.bucket
3732

@@ -92,13 +87,6 @@ data "aws_security_group" "existing_securitygroup" {
9287
}
9388
}
9489

95-
# data "aws_s3_bucket" "existing_config_bucket" {
96-
# # For now, look up the internal-dev bucket during int, ref and PR branch deploys.
97-
# count = local.create_config_bucket ? 0 : 1
98-
99-
# bucket = "imms-${local.config_bucket_env}-supplier-config"
100-
# }
101-
10290
data "aws_kms_key" "existing_lambda_encryption_key" {
10391
key_id = "alias/imms-batch-lambda-env-encryption"
10492
}

0 commit comments

Comments
 (0)