Skip to content

Instantly share code, notes, and snippets.

@doberloh
Created November 21, 2014 03:47
Show Gist options
  • Save doberloh/59f693be939ad403c53b to your computer and use it in GitHub Desktop.
Save doberloh/59f693be939ad403c53b to your computer and use it in GitHub Desktop.
rds.tf
resource "aws_db_security_group" "rds_sg" {
description = "${concat("Security group for stack ", var.stack)}"
name = "${concat(var.stack, "-rds-sg")}"
ingress {
security_group_owner_id = "${var.aws_prod_account_id}"
security_group_name = "infra-1-sg"
}
ingress {
security_group_owner_id = "${var.aws_dev_account_id}"
security_group_name = "ElasticMapReduce-master"
}
ingress {
security_group_owner_id = "${var.aws_dev_account_id}"
security_group_name = "nonprod-1-sg"
}
ingress {
security_group_owner_id = "${var.aws_dev_account_id}"
security_group_name = "nonprod-2-sg"
}
ingress {
security_group_owner_id = "${var.aws_dev_account_id}"
security_group_name = "nonprod-3-sg"
}
ingress {
security_group_owner_id = "${var.aws_dev_account_id}"
security-group-name = "nonprod-4-sg"
}
ingress {
security_group_owner_id = "${var.aws_dev_account_id}"
security_group_name = "nonprod-5-sg"
}
#i have tried using this line and not using this line
#ingress { cidr = "50.204.245.210/32" }
depends_on = "aws_route53_zone.top_level_domain"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment