Skip to content

Commit

Permalink
Fix the error when "create_security_group" is false (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
legal90 authored and antonbabenko committed Nov 8, 2019
1 parent 67b41ea commit 6510b3d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ resource "aws_rds_cluster" "this" {
preferred_maintenance_window = var.preferred_maintenance_window
port = local.port
db_subnet_group_name = local.db_subnet_group_name
vpc_security_group_ids = compact(concat([aws_security_group.this[0].id], var.vpc_security_group_ids))
vpc_security_group_ids = compact(concat(aws_security_group.this.*.id, var.vpc_security_group_ids))
snapshot_identifier = var.snapshot_identifier
storage_encrypted = var.storage_encrypted
apply_immediately = var.apply_immediately
Expand Down
2 changes: 1 addition & 1 deletion outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ output "this_rds_cluster_instance_endpoints" {
// aws_security_group
output "this_security_group_id" {
description = "The security group ID of the cluster"
value = aws_security_group.this[0].id
value = concat(aws_security_group.this.*.id, [""])[0]
}

0 comments on commit 6510b3d

Please sign in to comment.