OpenAPI specification for OneUptime. This document describes the API endpoints, request and response formats, and other details necessary for developers to interact with the OneUptime API.
- Clone the repository
git clone https://github.com/oneuptime/terraform-provider-oneuptime
cd terraform-provider-oneuptime- Build the provider using the Go
installcommand:
go buildterraform {
required_providers {
oneuptime = {
source = "oneuptime/oneuptime"
version = "12.0.31"
}
}
}
provider "oneuptime" {
oneuptime_url = "https://oneuptime.com" # or your self-hosted instance URL
api_key = var.oneuptime_api_key
}The source address carries no registry hostname on purpose: OpenTofu resolves it against registry.opentofu.org and Terraform against registry.terraform.io, and the provider is published to both. Drive it with tofu or terraform — see docs/guides/opentofu.md.
modules/ holds hand-written, engine-agnostic HCL modules:
monitoring-and-incident-response— HTTP monitors for a service, an on-call rotation paged when they fail, and a status page listing them.
module "storefront" {
source = "github.com/OneUptime/terraform-provider-oneuptime//modules/monitoring-and-incident-response?ref=v12.0.31"
service_name = "storefront"
monitors = { homepage = { url = "https://example.com" } }
}Pin ref to a published tag — this repository is regenerated on every release.
If you wish to work on the provider, you'll first need Go installed on your machine (see Requirements above).
To compile the provider, run go build. This will build the provider and put the provider binary in the current directory.
To generate or update documentation, run go generate.
In order to run the full suite of Acceptance tests, run make testacc.
Note: Acceptance tests create real resources, and often cost money to run.
make testaccTo install the provider locally for testing:
make installThis will build and install the provider to your local Terraform plugins directory.
To run unit tests:
go test ./...To run acceptance tests:
TF_ACC=1 go test ./... -v -timeout 120mDocumentation is generated using terraform-plugin-docs. Run the following command to generate documentation:
go generate- This is a read-only repository. The source code is generated from the OneUptime OpenAPI specification. You can check the main repository at OneUptime. Please fork the main repository and make changes there.
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -am 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.