Created
September 4, 2018 02:49
-
-
Save lawliet89/ad5aba366bb8391cfc232dcd7ffff73b to your computer and use it in GitHub Desktop.
Terraform Demo Snippets
This file contains 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" "instance" { | |
name = "${var.name}" | |
vpc_id = "${var.vpc_id}" | |
tags = "${merge(var.tags, map("Name", "${var.name}"))}" | |
} | |
resource "aws_security_group_rule" "ssh_inbound" { | |
type = "ingress" | |
from_port = 22 | |
to_port = 22 | |
protocol = "tcp" | |
cidr_blocks = ["${var.ssh_cidr_blocks}"] | |
security_group_id = "${aws_security_group.instance.id}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment