Created
June 14, 2020 16:49
-
-
Save rohitg00/0e9680f69587d5f2b8aa4b7fe1881929 to your computer and use it in GitHub Desktop.
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
//Launching EC2 Instance | |
resource "aws_instance" "web" { | |
ami = "${var.ami_id}" | |
instance_type = "${var.ami_type}" | |
key_name = "${aws_key_pair.generated_key.key_name}" | |
security_groups = ["${aws_security_group.web-SG.name}","default"] | |
//Labelling the Instance | |
tags = { | |
Name = "Web-Env" | |
env = "Production" | |
} | |
depends_on = [ | |
aws_security_group.web-SG, | |
aws_key_pair.generated_key | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment