This repository contains Terraform configurations to deploy a virtual machine instance running Uptime Kuma, a self-hosted monitoring tool, on any cloud provider. The deployment script also installs Docker and runs the Uptime Kuma Docker container.
Terraform is an open-source infrastructure as a code
software tool created by HashiCorp. It allows users to define and provision datacenter infrastructure using a high-level configuration language known as HashiCorp Configuration Language (HCL), or optionally JSON. Terraform manages external resources (such as public cloud infrastructure, private cloud infrastructure, network appliances, and software as a service) with a "provider" model, supporting multiple providers such as AWS, Azure, Google Cloud, and others.
Still want to learn more about Terraform? Watch this YouTube video
- Terraform installed
- Cloud provider CLI configured with appropriate permissions (e.g., AWS CLI, Azure CLI, Google Cloud SDK)
-
Clone the repository:
git clone https://github.com/your-username/uptime-kuma-terraform.git cd uptime-kuma-terraform
-
Initialize Terraform:
terraform init
-
Validate the configuration:
terraform validate
-
Plan the deployment:
terraform plan
-
Apply the configuration:
terraform apply
Confirm the apply action when prompted.
Now your server is up and running, just wait a few seconds to finish initializing, then you can access the Uptime Kuma dashboard by navigating to the public IP address which is printed in the terminal after the deployment is finished.
Destroy the configuration if needed:
# use this to revert back if you want to switch down what you applied!
terraform destroy
This project is licensed under the MIT License.