diff --git a/kapakiii.tf b/kapakiii.tf new file mode 100644 index 0000000..2ee298f --- /dev/null +++ b/kapakiii.tf @@ -0,0 +1,20 @@ + +resource "aws_instance" "ec2_vm_kapakiii_2" { + 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 = "kapakiii" + } +} + +resource "aws_eip" "ec2_eip_kapakiii" { + instance = aws_instance.ec2_vm_kapakiii_2.id +} + +output "instance_public_ip_kapakiii" { + description = "Public IP of the EC2 instance" + value = aws_eip.ec2_eip_kapakiii.public_ip +} diff --git a/netbird.tf b/netbird.bu similarity index 100% rename from netbird.tf rename to netbird.bu diff --git a/sg.tf b/sg.tf index dc83d6e..69df081 100644 --- a/sg.tf +++ b/sg.tf @@ -17,6 +17,14 @@ resource "aws_security_group" "ec2_sg" { cidr_blocks = ["0.0.0.0/0"] } + + ingress { + from_port = 8080 + to_port = 8080 + protocol = "tcp" + cidr_blocks = ["0.0.0.0/0"] + } + ingress { from_port = 443 to_port = 443