Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated secret used to store bucket ARNs #8124

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}