Localstack deployment

As Qovery can be deployed using Terraform, I am wondering if it can be deployed to localstack for local testing purposes?

I guess, the problem might be that the Qovery Terraform provider creates resources at Qovery which in turn creates resources at AWS. The puropose of localstack is deploying AWS resources directly.

I would say whats the reason behind using localstack? Is there any specific funcionality related to your setup that requires testing on a 1-to-1 clone of the AWS environment. I have used localstack before for serverless environments, but afaik Qovery does not support serverless services and just orchestrates your EKS and EC2 instances which at the end can easily be replicated with docker containers. As thats usually where the domain of applications end you should not need to be testing whether Qovery can deploy on AWS as that comes implicit by using the Qovery Service

If it is out of curiosity the terraform provider probably just uses the Qovery API to create your instances, and to my understanding Qovery from its API connects to your cloud-provider deployed Qovery Engine which then handles and orchestrates all the deployments, so i think you will have to modify the terraform-provider for it to connect to your localstack instance

1 Like

As Qovery apps can be tightly integrated with resources in other accounts through VPC peering, I do see a benefit of testing this locally.

@rophilogene Is there any way of of modifying the host where the Terraform Provider should connect to, i.e. not AWS but LocalStack? LocalStack provides a few wrapper for common IaC tool for a similiar use case, e.g. GitHub - localstack/terraform-local: Small wrapper script to run Terraform against LocalStack

2 Likes

Hi, sorry for the late reply. There is no way to modify our Terraform provider to target a Localstack environment. However, what you can do is creating Qovery services that run your localstack services and from your code targeting those services instead the one from AWS.

Can you tell me more about your use case and why you might want using localstack with Qovery?