-
-
Save nodesocket/2c8d5fb0b1711ad7d6a32679e06e850b to your computer and use it in GitHub Desktop.
aws_security_group test thing
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
provider "aws" { | |
region = "us-east-1" | |
} | |
variable "cidr" { | |
# default = "0.0.0.0/0" | |
default = "" | |
} | |
resource "aws_security_group" "dummy" { | |
name = "dummy-arthur-can-delete" | |
description = "dummy-dummy-dummy-dummy" | |
} | |
resource "aws_security_group_rule" "dummy" { | |
count = "${var.cidr == "" ? 0 : 1}" | |
type = "ingress" | |
from_port = 11211 | |
to_port = 11211 | |
protocol = "tcp" | |
cidr_blocks = ["${var.cidr}"] | |
security_group_id = "${aws_security_group.dummy.id}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment