For this blogpost, we will be using the application first showed in my previous post Building a Quarkus CRUD application.
Previously, we’ve tested our Quarkus application locally in our machine, using a Docker container running a Postgres database to test the CRUD service. Now we will be deploying this application in AWS so we can see how quickly and easily we can deploy our app in the cloud.
The infrastructure we will be using is very simple:
We could manually create all these resources in AWS Console, but we can just use Terraform to declare all our resource and then create such resources in our AWS account.
The main.tf
used is here: Terraform Quarkus Demo
Note: Before trying to use Terraform, check if you have the aws
CLI program installed and configured in your system!
Having all properly configured, we can just run:
1
2
3
$ terraform init
$ terrfaorm validate
$ terraform apply
Note: you can later delete all these resources created by Terraform by running terraform destroy
.
TODO
TODO