File tree Expand file tree Collapse file tree 3 files changed +0
-22
lines changed
Expand file tree Collapse file tree 3 files changed +0
-22
lines changed Original file line number Diff line number Diff 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
255255resource "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
268266resource "aws_lambda_permission" "new_s3_invoke_permission" {
269- # count = local.create_config_bucket ? 1 : 0
270267
271268 statement_id = " AllowExecutionFromNewS3"
272269 action = " lambda:InvokeFunction"
Original file line number Diff line number Diff line change @@ -192,15 +192,10 @@ resource "aws_s3_bucket_lifecycle_configuration" "data_destinations" {
192192}
193193
194194resource "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
201198resource "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
212207resource "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 ({
Original file line number Diff line number Diff 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-
10290data "aws_kms_key" "existing_lambda_encryption_key" {
10391 key_id = " alias/imms-batch-lambda-env-encryption"
10492}
You can’t perform that action at this time.
0 commit comments