From 4149d8954ee03d50da5c330f17a6885dd240ae80 Mon Sep 17 00:00:00 2001 From: Gorman Stock Date: Thu, 5 Oct 2023 14:34:45 +0000 Subject: [PATCH] remove db-connect --- main.tf | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/main.tf b/main.tf index 7ad7566..90f0d68 100644 --- a/main.tf +++ b/main.tf @@ -57,14 +57,6 @@ data "aws_iam_policy_document" "ottertune_db_policy" { } -data "aws_iam_policy_document" "ottertune_connect_policy" { - statement { - actions = ["rds-db:connect"] - resources = ["arn:aws:rds-db:*:*:dbuser:*/ottertune*"] - } -} - - data "aws_iam_policy_document" "ottertune_copy_pg_policy" { statement { actions = [ @@ -116,8 +108,7 @@ data "aws_iam_policy_document" "ottertune_cluster_tuning_policy" { } data "aws_iam_policy_document" "ottertune_policy_document_combined" { - source_policy_documents = concat([data.aws_iam_policy_document.ottertune_db_policy.json, - data.aws_iam_policy_document.ottertune_connect_policy.json], + source_policy_documents = concat([data.aws_iam_policy_document.ottertune_db_policy.json], var.permissions_level == "write_limited" ? [data.aws_iam_policy_document.ottertune_copy_pg_policy.json, data.aws_iam_policy_document.ottertune_pg_policy.json, data.aws_iam_policy_document.ottertune_cluster_pg_policy.json] : [], length(var.tunable_parameter_group_arns) > 0 ? [data.aws_iam_policy_document.ottertune_tuning_policy.json] : [], length(var.tunable_aurora_cluster_parameter_group_arns) > 0 ? [data.aws_iam_policy_document.ottertune_cluster_tuning_policy.json] : [])