Skip to content
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

vpc_security_group_ids for Terraform 0.12 #49

Merged
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ Terraform documentation is generated automatically using [pre-commit hooks](http
| tags | A map of tags to add to all resources. | map | `{}` | no |
| username | Master DB username | string | `"root"` | no |
| vpc\_id | VPC ID | string | n/a | yes |
| vpc\_security\_group\_ids | List of VPC security groups to associate to the cluster in addition to the SG we create in this module | list | `[]` | no |

## Outputs

Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ resource "aws_rds_cluster" "this" {
preferred_maintenance_window = var.preferred_maintenance_window
port = local.port
db_subnet_group_name = aws_db_subnet_group.this.name
vpc_security_group_ids = [aws_security_group.this.id]
vpc_security_group_ids = 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
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -237,3 +237,8 @@ variable "engine_mode" {
default = "provisioned"
}

variable "vpc_security_group_ids" {
description = "List of VPC security groups to associate to the cluster in addition to the SG we create in this module"
type = list
default = []
}