mirror of
https://github.com/farcasclaudiu/terraform-course.git
synced 2026-06-22 07:01:56 +03:00
5d9eeb6c4c
* Terraform 0.12
15 lines
327 B
Terraform
15 lines
327 B
Terraform
resource "aws_instance" "example" {
|
|
ami = var.AMIS[var.AWS_REGION]
|
|
instance_type = "t2.micro"
|
|
|
|
# the VPC subnet
|
|
subnet_id = aws_subnet.main-public-1.id
|
|
|
|
# the security group
|
|
vpc_security_group_ids = [aws_security_group.allow-ssh.id]
|
|
|
|
# the public SSH key
|
|
key_name = aws_key_pair.mykeypair.key_name
|
|
}
|
|
|