Hi@akhtar,
You can use the aws_instance resource in Terraform. This helps us to launch an instance in AWS. But before that, you need the details of AMI ID, type, etc. You can take help from the below-given code.
resource "aws_instance" "WordPress" {
ami = "ami-000cbce3e1b899ebd"
instance_type = "t2.micro"
associate_public_ip_address = true
subnet_id = aws_subnet.public.id
vpc_security_group_ids = [aws_security_group.mywebsecurity.id]
key_name = "mynewkey"
availability_zone = "ap-south-1a"
tags = {
Name = "wordpress"
}