generated from cloudposse-terraform-components/template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
bug🐛 An issue with the system🐛 An issue with the system
Description
Describe the Bug
Using additional grants not working as password for additional_users
stored in SSM at
/aurora-postgres/{cluster identity}/{service name}/passwords/{user name}
while additional_grants
looking for /aurora-postgres/{cluster identity}/{user name}/passwords
Steps to reproduce
- Try to deploy
components:
terraform:
aurora-postgres-resources:
vars:
enabled: true
additional_users:
example:
db_user: example
db_password: ""
grants: []
additional_grants:
example:
- grant: ["ALL"]
db: postgres
Error
TestComponent 2025-01-16T03:05:33+01:00 logger.go:67: module.additional_users["q1zpom"].postgresql_role.default[0]: Refreshing state... [id=evgt0w]
TestComponent 2025-01-16T03:05:33+01:00 logger.go:67: module.additional_users["q1zpom"].module.parameter_store_write.aws_ssm_parameter.default["/aurora-postgres/eg-default-ue2-test-db-pt2u56/q1zpom/passwords/evgt0w"]: Refreshing state... [id=/aurora-postgres/eg-default-ue2-test-db-pt2u56/q1zpom/passwords/evgt0w]
TestComponent 2025-01-16T03:05:37+01:00 logger.go:67:
TestComponent 2025-01-16T03:05:37+01:00 logger.go:67: Warning: Argument is deprecated
TestComponent 2025-01-16T03:05:37+01:00 logger.go:67:
TestComponent 2025-01-16T03:05:37+01:00 logger.go:67: with module.additional_users["q1zpom"].module.parameter_store_write.aws_ssm_parameter.default["/aurora-postgres/eg-default-ue2-test-db-pt2u56/q1zpom/passwords/evgt0w"],
TestComponent 2025-01-16T03:05:37+01:00 logger.go:67: on .terraform/0a8a90-nmchp4/modules/additional_users.parameter_store_write/main.tf line 22, in resource "aws_ssm_parameter" "default":
TestComponent 2025-01-16T03:05:37+01:00 logger.go:67: 22: overwrite = each.value.overwrite
TestComponent 2025-01-16T03:05:37+01:00 logger.go:67:
TestComponent 2025-01-16T03:05:37+01:00 logger.go:67: this attribute has been deprecated
TestComponent 2025-01-16T03:05:37+01:00 logger.go:67:
TestComponent 2025-01-16T03:05:37+01:00 logger.go:67: Error: reading SSM Parameter (/aurora-postgres/eg-default-ue2-test-db-pt2u56/evgt0w/password): couldn't find resource
TestComponent 2025-01-16T03:05:37+01:00 logger.go:67:
TestComponent 2025-01-16T03:05:37+01:00 logger.go:67: with data.aws_ssm_parameter.password["evgt0w"],
TestComponent 2025-01-16T03:05:37+01:00 logger.go:67: on main.tf line 16, in data "aws_ssm_parameter" "password":
TestComponent 2025-01-16T03:05:37+01:00 logger.go:67: 16: data "aws_ssm_parameter" "password" {
TestComponent 2025-01-16T03:05:37+01:00 logger.go:67:
TestComponent 2025-01-16T03:05:37+01:00 logger.go:67:
TestComponent 2025-01-16T03:05:37+01:00 logger.go:67: Error: Invalid value for input variable
TestComponent 2025-01-16T03:05:37+01:00 logger.go:67:
TestComponent 2025-01-16T03:05:37+01:00 logger.go:67: on main.tf line 61, in module "additional_grants":
TestComponent 2025-01-16T03:05:37+01:00 logger.go:67: 61: grants = each.value
TestComponent 2025-01-16T03:05:37+01:00 logger.go:67:
TestComponent 2025-01-16T03:05:37+01:00 logger.go:67: The given value is not suitable for
TestComponent 2025-01-16T03:05:37+01:00 logger.go:67: module.additional_grants["evgt0w"].var.grants declared at
TestComponent 2025-01-16T03:05:37+01:00 logger.go:67: modules/postgresql-user/variables.tf:18,1-18: incorrect list element type:
TestComponent 2025-01-16T03:05:37+01:00 logger.go:67: attribute "object_type" is required.
TestComponent 2025-01-16T03:05:38+01:00 logger.go:67: exit status 1
TestComponent 2025-01-16T03:05:38+01:00 logger.go:67:
TestComponent 2025-01-16T03:05:38+01:00 retry.go:99: Returning due to fatal error: FatalError{Underlying: error while running command: exit status 1;
Error: reading SSM Parameter (/aurora-postgres/eg-default-ue2-test-db-pt2u56/evgt0w/password): couldn't find resource
with data.aws_ssm_parameter.password["evgt0w"],
on main.tf line 16, in data "aws_ssm_parameter" "password":
16: data "aws_ssm_parameter" "password" {
Error: Invalid value for input variable
on main.tf line 61, in module "additional_grants":
61: grants = each.value
The given value is not suitable for
module.additional_grants["evgt0w"].var.grants declared at
modules/postgresql-user/variables.tf:18,1-18: incorrect list element type:
attribute "object_type" is required.
exit status 1
}
Metadata
Metadata
Assignees
Labels
bug🐛 An issue with the system🐛 An issue with the system