Skip to content

OneUptime/terraform-provider-oneuptime

Repository files navigation

Terraform Provider for Oneuptime

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.

Requirements

Building The Provider

  1. Clone the repository
git clone https://github.com/oneuptime/terraform-provider-oneuptime
cd terraform-provider-oneuptime
  1. Build the provider using the Go install command:
go build

Using the Provider

terraform {
  required_providers {
    oneuptime = {
      source = "oneuptime/oneuptime"
      version = "1.0.0"
    }
  }
}

provider "oneuptime" {
  oneuptime_url = "https://api.oneuptime.com"
  api_key       = var.oneuptime_api_key
}

Developing the Provider

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 testacc

Local Installation

To install the provider locally for testing:

make install

This will build and install the provider to your local Terraform plugins directory.

Testing

To run unit tests:

go test ./...

To run acceptance tests:

TF_ACC=1 go test ./... -v -timeout 120m

Documentation

Documentation is generated using terraform-plugin-docs. Run the following command to generate documentation:

go generate

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -am 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.

About

Terraform Provider for OneUptime

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages