Created
February 26, 2019 17:40
-
-
Save 100daysofdevops/f8169c4bb5624f0c7073b3350331ce5c to your computer and use it in GitHub Desktop.
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_instance" "test_instance" { | |
| count = "${var.instance_count}" | |
| ami = "${data.aws_ami.centos.id}" | |
| instance_type = "${var.instance_type}" | |
| key_name = "${aws_key_pair.mytest-key.id}" | |
| vpc_security_group_ids = ["${var.security_group}"] | |
| subnet_id = "${element(var.subnet_mask, count.index )}" | |
| user_data = "${data.template_file.user-init.rendered}" | |
| tags { | |
| Name = "my-test-server.${count.index + 1}" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment