19 lines
582 B
HCL
19 lines
582 B
HCL
resource "aws_instance" "ec2_vm_netbird" {
|
|
ami = "ami-02a53b0d62d37a757" # Replace with a valid AMI ID for your region
|
|
instance_type = "t2.micro" # Free tier eligible instance type
|
|
security_groups = [aws_security_group.ec2_sg.name]
|
|
key_name = "theocorp" # Replace with your AWS key pair name
|
|
|
|
tags = {
|
|
Name = "netbird"
|
|
}
|
|
}
|
|
|
|
resource "aws_eip" "ec2_eip_netbird" {
|
|
instance = aws_instance.ec2_vm_netbird.id
|
|
}
|
|
|
|
output "instance_public_ip_netbird" {
|
|
description = "Public IP of the Netbird instance"
|
|
value = aws_eip.ec2_eip_netbird.public_ip
|
|
} |