BetterStackHQ / terraform-provider-better-uptime

Apache License 2.0
49 stars 15 forks source link

terraform-provider-better-uptime

build tests documentation

Terraform (0.14+) provider for Better Uptime.

Installation

terraform {
  required_version = ">= 0.14"
  required_providers {
    betteruptime = {
      source  = "BetterStackHQ/better-uptime"
      version = ">= 0.9.3"
    }
  }
}

Example Usage

provider "betteruptime" {
  # `api_token` can be omitted if BETTERUPTIME_API_TOKEN env var is set.
  api_token = "XXXXXXXXXXXXXXXXXXXXXXXX"
}

resource "betteruptime_status_page" "this" {
  company_name = "Example, Inc"
  company_url  = "https://example.com"
  timezone     = "UTC"
  subdomain    = "example"
}

resource "betteruptime_monitor" "this" {
  url          = "https://example.com"
  monitor_type = "status"
}

resource "betteruptime_status_page_resource" "monitor" {
  status_page_id = betteruptime_status_page.this.id
  resource_id    = betteruptime_monitor.this.id
  resource_type  = "Monitor"
  public_name    = "example.com site"
}

See examples/ for more.

Documentation

See Better Uptime API docs to obtain API Token and get the complete list of parameter options. Or explore the Terraform Registry docs.

Development

PREREQUISITE: go1.16+.

git clone https://github.com/BetterStackHQ/terraform-provider-better-uptime && \
  cd terraform-provider-better-uptime

make help