terraform-aws-modules / terraform-aws-rds-proxy

Terraform module to create AWS RDS Proxy resources 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/rds-proxy/aws
Apache License 2.0
56 stars 54 forks source link

Can't have more than 1 secret #19

Closed gaspo53 closed 1 year ago

gaspo53 commented 1 year ago

Can't have more than 1 secret for the input variable secrets. It errors out with the following: │ Error: Insufficient auth blocks │ │ on .terraform/modules/rds_proxy/main.tf line 13, in resource "aws_db_proxy" "this": │ 13: resource "aws_db_proxy" "this" { │ │ At least 1 "auth" blocks are required. ╵ ╷ │ Error: Invalid dynamic for_each value │ │ on .terraform/modules/rds_proxy/main.tf line 26, in resource "aws_db_proxy" "this": │ 26: for_each = var.secrets │ │ Cannot use a map of object value in for_each. An iterable collection is required.

Thanks in advance

gaspo53 commented 1 year ago

Apparently is something related of the map key. Having this makes it to work: secrets = { root = { description = aws_secretsmanager_secret.rds_proxy_root.description arn = aws_secretsmanager_secret.rds_proxy_root.arn kms_key_id = aws_secretsmanager_secret.rds_proxy_root.kms_key_id } service_preprod = { description = aws_secretsmanager_secret.rails_app_preprod.description arn = aws_secretsmanager_secret.rails_app_preprod.arn kms_key_id = aws_secretsmanager_secret.rails_app_preprod.kms_key_id } }

bryantbiggs commented 1 year ago

please provide the details requested in the bug/feature request templates

antonbabenko commented 1 year ago

This issue has been resolved in version 3.0.0 :tada:

github-actions[bot] commented 1 year ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.