2019-12-09 18:39:21 +08:00
|
|
|
resource "aws_instance" "os_test_machine" {
|
|
|
|
ami = "${var.ami}"
|
2019-12-12 23:26:40 +08:00
|
|
|
instance_type = "${var.type}"
|
2019-12-09 18:39:21 +08:00
|
|
|
private_ip = "${var.ip}"
|
|
|
|
subnet_id = "${data.aws_subnet.main.id}"
|
|
|
|
key_name = "os_compat"
|
|
|
|
tags = {
|
2019-12-17 00:41:31 +08:00
|
|
|
Name = "os_compat_${var.name}"
|
2019-12-19 19:54:22 +08:00
|
|
|
Purpose = "os_compat_instance"
|
2019-12-09 18:39:21 +08:00
|
|
|
}
|
2019-12-12 00:13:19 +08:00
|
|
|
vpc_security_group_ids = ["${data.aws_security_group.os_compat_instance.id}"]
|
|
|
|
associate_public_ip_address = true
|
|
|
|
user_data = "${var.user_data}"
|
2019-12-09 18:39:21 +08:00
|
|
|
}
|