Skip to content

Instantly share code, notes, and snippets.

@nodesocket
Forked from artburkart/main.tf
Created June 14, 2017 03:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nodesocket/2c8d5fb0b1711ad7d6a32679e06e850b to your computer and use it in GitHub Desktop.
Save nodesocket/2c8d5fb0b1711ad7d6a32679e06e850b to your computer and use it in GitHub Desktop.
aws_security_group test thing
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