Terraform module to deploy QDrant vector DB on EC2 AWS. For development usage only(for now).
Made by CTOFriendly team. Need help with produt development or growth? Visit our website to learn more!
Make sure you have Terraform installed and configured with AWS credentials.
Create a main.tf
file with the following content:
module "qdrant" {
source = "CTOFriendly/qdrant/aws"
version = "0.0.1"
region = "ap-south-1"
instance_type = "t4g.micro"
key_name = "qdrant-key"
disk_size = 30
}
Then run the following commands:
terraform init
terraform apply
This creates an EC2 instance with Qdrant installed and running. The instance is accessible via SSH using the generated key pair which is saved in the current directory as qdrant-key.pem
.
You can then forward the Qdrant port to your local machine via following command:
ssh -i qdrant-key.pem -L -N 6333:localhost:6333 ubuntu@$(terraform output -raw qdrant_ip) &
And now you can access Qdrant on your local machine at localhost:6333
!
Name | Version |
---|---|
aws | 4.66.1 |
local | 2.4.0 |
tls | 4.0.4 |
No modules.
Name | Type |
---|---|
aws_eip.bar | resource |
aws_instance.example | resource |
aws_internet_gateway.gw | resource |
aws_key_pair.example | resource |
aws_route.public_internet | resource |
aws_route_table.public | resource |
aws_route_table_association.public | resource |
aws_security_group.example | resource |
aws_subnet.public | resource |
aws_vpc.example | resource |
local_file.private_key | resource |
tls_private_key.example | resource |
aws_ami.ubuntu_arm64 | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
disk_size | Size of the root disk in GB | number |
30 |
no |
instance_type | AWS instance type to use for the Qdrant instance | string |
"t4g.micro" |
no |
key_name | Name of the AWS key pair which will be generated to use for the Qdrant instance | string |
"qdrant-key" |
no |
region | AWS region in which to deploy the Qdrant instance | string |
"ap-south-1" |
no |
Name | Description |
---|---|
private_key | n/a |
public_key | n/a |
qdrant_ip | n/a |