Skip to content

Commit

Permalink
removed deprecated secret used to store bucket ARNs
Browse files Browse the repository at this point in the history
  • Loading branch information
dms1981 committed Sep 30, 2024
1 parent 2704165 commit 9c873a7
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 73 deletions.
18 changes: 0 additions & 18 deletions terraform/environments/core-logging/cortex.tf
Original file line number Diff line number Diff line change
Expand Up @@ -254,24 +254,6 @@ data "aws_kms_alias" "secrets" {
name = "alias/secrets_key"
}

resource "aws_secretsmanager_secret" "logging" {
# checkov:skip=CKV2_AWS_57
provider = aws.modernisation-platform
kms_key_id = data.aws_kms_alias.secrets.target_key_id
name = "core_logging_bucket_arns"
recovery_window_in_days = 0
tags = local.tags
}

resource "aws_secretsmanager_secret_version" "logging" {
provider = aws.modernisation-platform
secret_id = aws_secretsmanager_secret.logging.id
secret_string = jsonencode({
for key in local.cortex_logging_buckets :
key => aws_s3_bucket.logging[key].arn
})
}

resource "aws_iam_user" "cortex_xsiam_user" {
#checkov:skip=CKV_AWS_273: This has been agreed by the TA that for this purpose an IAM user account can be used.
name = "cortex_xsiam_user"
Expand Down
11 changes: 0 additions & 11 deletions terraform/environments/core-logging/secrets.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,3 @@ data "aws_secretsmanager_secret_version" "pagerduty_integration_keys" {
provider = aws.modernisation-platform
secret_id = data.aws_secretsmanager_secret.pagerduty_integration_keys.id
}

# Get the ARNs of the logging buckets in `core-logging`
data "aws_secretsmanager_secret" "core_logging_bucket_arns" {
provider = aws.modernisation-platform
name = "core_logging_bucket_arns"
}

data "aws_secretsmanager_secret_version" "core_logging_bucket_arns" {
provider = aws.modernisation-platform
secret_id = data.aws_secretsmanager_secret.core_logging_bucket_arns.id
}
11 changes: 0 additions & 11 deletions terraform/environments/core-network-services/secrets.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,6 @@ data "aws_secretsmanager_secret_version" "pagerduty_integration_keys" {
secret_id = data.aws_secretsmanager_secret.pagerduty_integration_keys.id
}

# Get the ARNs of the logging buckets in `core-logging`
data "aws_secretsmanager_secret" "core_logging_bucket_arns" {
provider = aws.modernisation-platform
name = "core_logging_bucket_arns"
}

data "aws_secretsmanager_secret_version" "core_logging_bucket_arns" {
provider = aws.modernisation-platform
secret_id = data.aws_secretsmanager_secret.core_logging_bucket_arns.id
}

# Environment logging secret KMS key
resource "aws_kms_key" "environment_logging" {
description = "environment-logging"
Expand Down
11 changes: 0 additions & 11 deletions terraform/environments/core-security/secrets.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,3 @@ data "aws_secretsmanager_secret_version" "pagerduty_integration_keys" {
provider = aws.modernisation-platform
secret_id = data.aws_secretsmanager_secret.pagerduty_integration_keys.id
}

# Get the ARNs of the logging buckets in `core-logging`
data "aws_secretsmanager_secret" "core_logging_bucket_arns" {
provider = aws.modernisation-platform
name = "core_logging_bucket_arns"
}

data "aws_secretsmanager_secret_version" "core_logging_bucket_arns" {
provider = aws.modernisation-platform
secret_id = data.aws_secretsmanager_secret.core_logging_bucket_arns.id
}
11 changes: 0 additions & 11 deletions terraform/environments/core-shared-services/secrets.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,3 @@ data "aws_secretsmanager_secret_version" "pagerduty_integration_keys" {
provider = aws.modernisation-platform
secret_id = data.aws_secretsmanager_secret.pagerduty_integration_keys.id
}

# Get the ARNs of the logging buckets in `core-logging`
data "aws_secretsmanager_secret" "core_logging_bucket_arns" {
provider = aws.modernisation-platform
name = "core_logging_bucket_arns"
}

data "aws_secretsmanager_secret_version" "core_logging_bucket_arns" {
provider = aws.modernisation-platform
secret_id = data.aws_secretsmanager_secret.core_logging_bucket_arns.id
}
11 changes: 0 additions & 11 deletions terraform/environments/core-vpc/secrets.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,3 @@ data "aws_secretsmanager_secret_version" "pagerduty_integration_keys" {
provider = aws.modernisation-platform
secret_id = data.aws_secretsmanager_secret.pagerduty_integration_keys.id
}

# Get the ARNs of the logging buckets in `core-logging`
data "aws_secretsmanager_secret" "core_logging_bucket_arns" {
provider = aws.modernisation-platform
name = "core_logging_bucket_arns"
}

data "aws_secretsmanager_secret_version" "core_logging_bucket_arns" {
provider = aws.modernisation-platform
secret_id = data.aws_secretsmanager_secret.core_logging_bucket_arns.id
}

0 comments on commit 9c873a7

Please sign in to comment.