Last active
March 19, 2018 15:36
-
-
Save santiagopoli/7255f9bd20ce8b37fe00348fb4d59ef1 to your computer and use it in GitHub Desktop.
Terraform Blue Green / Security Groups
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_security_group" "terraform-blue-green" { | |
description = "Terraform Blue/Green" | |
vpc_id = "${var.vpc_id}" | |
name = "terraform-blue-green-v${var.infrastructure_version}" | |
tags { | |
Name = "Terraform Blue/Green (v${var.infrastructure_version})" | |
} | |
} | |
resource "aws_security_group_rule" "terraform-blue-green-inbound" { | |
type = "ingress" | |
security_group_id = "${aws_security_group.terraform-blue-green.id}" | |
from_port = -1 | |
to_port = 0 | |
protocol = "-1" | |
cidr_blocks = ["0.0.0.0/0"] | |
} | |
resource "aws_security_group_rule" "terraform-blue-green-outbound" { | |
type = "egress" | |
security_group_id = "${aws_security_group.terraform-blue-green.id}" | |
from_port = -1 | |
to_port = 0 | |
protocol = "-1" | |
cidr_blocks = ["0.0.0.0/0"] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment