Skip to content

feat: add kms key arn input for customer-managed keys #24

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

Merged
merged 1 commit into from
Apr 29, 2025
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
2 changes: 1 addition & 1 deletion src/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
ssm_path_prefix = format("/%s/%s", var.ssm_path_prefix, module.aurora_postgres.outputs.cluster_identifier)
ssm_password_source = length(var.ssm_password_source) > 0 ? var.ssm_password_source : format("%s/%s", local.ssm_path_prefix, "%s/password")

kms_key_arn = module.aurora_postgres.outputs.kms_key_arn
kms_key_arn = coalesce(module.aurora_postgres.outputs.kms_key_arn, var.kms_key_arn)

default_schema_owner = "postgres"

Check warning on line 13 in src/main.tf

View workflow job for this annotation

GitHub Actions / component / terraform / Lint (./src)

[tflint] reported by reviewdog 🐶 local.default_schema_owner is declared but not used Raw Output: main.tf:13:3: warning: local.default_schema_owner is declared but not used ()
}

data "aws_ssm_parameter" "password" {
Expand Down
6 changes: 6 additions & 0 deletions src/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ variable "cluster_enabled" {
description = "Set to `false` to prevent the module from creating any resources"
}

variable "kms_key_arn" {
type = string
description = "The ARN for the KMS encryption key."
default = null
}

variable "additional_databases" {
type = set(string)
default = []
Expand Down
Loading