Conversation
8e82419 to
0c47343
Compare
0c47343 to
51b047f
Compare
There was a problem hiding this comment.
How about making this conditional so we aren't opening up a port they aren't using?
There was a problem hiding this comment.
unless i group both of them in another layer of module, it seems like terraform doesn't like references to conditional modules, i get this error when have 2 conditional rds_security_group
Error: Unsupported attribute
on ../../modules/database/main.tf line 105, in module "rds_postgres":
105: vpc_security_group_ids = ["${module.rds_security_group_postgres.this_security_group_id}"]
This value does not have any attributes.
Error: Unsupported attribute
on ../../modules/database/main.tf line 155, in module "rds_mysql":
155: vpc_security_group_ids = [module.rds_security_group_mysql.this_security_group_id]
This value does not have any attributes.There was a problem hiding this comment.
How about just having a single group but changing the rule depending on which db is chosen?
There was a problem hiding this comment.
like this? 457fdc9#diff-fc95e87f6973cfeeb3e12756fd64f5d5L10-L25
yeah this seems to work, not sure if it's a little harder to read though
There was a problem hiding this comment.
If we add another type of DB the ternary operator wouldn't work and we'd have to switch to a lookup or something which might be cleaner, but for now it should be fine.
There was a problem hiding this comment.
Should be "engine" or just "which database", not "driver"
01fd80b to
457fdc9
Compare
457fdc9 to
3246ead
Compare
Uh oh!
There was an error while loading. Please reload this page.