Skip to content

About

Terraform provider for managing uptime monitoring, on-call, status pages, logs, metrics and errors in Better Stack

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Better Stack Terraform provider

The betterstack provider manages Better Stack with Terraform. One provider and one global API token cover uptime monitoring, on-call, status pages, telemetry, dashboards and error tracking, with 93 resources and 113 data sources.

Example usage

terraform {
  required_providers {
    betterstack = {
      source = "BetterStackHQ/betterstack"
    }
  }
}

provider "betterstack" {
  team_id = "t123" # only for a global API token
}

resource "betterstack_monitor" "example" {
  url = "https://uptime.betterstack.com"
}

Set your API token in the BETTERSTACK_API_TOKEN environment variable, or in the provider's api_token, then run terraform apply. Use a global API token from Better Stack → API tokens → Global tokens, or a team API token from Better Stack → API tokens → Team-based tokens. A team API token works only with the product it was created for. An Incidents API token works with uptime monitoring, on-call, status pages, team members and roles. A Telemetry API token works with sources, collectors, dashboards, metrics and error tracking. A Cloud API token works with Cloud's servers, networking, storage, managed services and Kubernetes. To manage more than one product with team API tokens, follow the example under API tokens to configure the provider once per product. team_id picks the team when the token can reach several, as a global API token can. Write it as the team's ID from Better Stack URLs, such as t123.

Monitors, heartbeats, sources and some other resources start with deletion_protection = true, so terraform destroy stops at them until you set it to false and run terraform apply.

Resources

Cloud (36): betterstack_certificate, betterstack_clickhouse, betterstack_clickhouse_scheduled_snapshot, betterstack_firewall, betterstack_firewall_rule, betterstack_kafka, betterstack_kafka_topic, betterstack_kafka_user, betterstack_kubernetes_cluster, betterstack_kubernetes_node_pool, betterstack_kubernetes_scheduled_snapshot, betterstack_load_balancer, betterstack_load_balancer_service, betterstack_load_balancer_target, betterstack_mysql, betterstack_mysql_scheduled_snapshot, betterstack_network, betterstack_object_cache, betterstack_object_cache_bucket, betterstack_otlp, betterstack_placement_group, betterstack_postgres, betterstack_postgres_database, betterstack_postgres_scheduled_snapshot, betterstack_postgres_user, betterstack_reserved_ip, betterstack_scheduled_snapshot, betterstack_scheduled_volume_snapshot, betterstack_server, betterstack_server_pool, betterstack_server_private_ip, betterstack_ssh_key, betterstack_valkey, betterstack_valkey_scheduled_snapshot, betterstack_volume, betterstack_webhook

Incidents (32): betterstack_catalog_record, betterstack_catalog_relation, betterstack_escalation_policy, betterstack_escalation_policy_group, betterstack_heartbeat, betterstack_heartbeat_group, betterstack_incidents_amazon_sns_integration, betterstack_incidents_aws_cloudwatch_integration, betterstack_incidents_azure_integration, betterstack_incidents_datadog_integration, betterstack_incidents_elastic_integration, betterstack_incidents_google_monitoring_integration, betterstack_incidents_grafana_integration, betterstack_incidents_incoming_email_integration, betterstack_incidents_incoming_webhook_integration, betterstack_incidents_jira_integration, betterstack_incidents_linear_integration, betterstack_incidents_new_relic_integration, betterstack_incidents_outgoing_email_integration, betterstack_incidents_outgoing_pagerduty_integration, betterstack_incidents_outgoing_webhook_integration, betterstack_incidents_prometheus_integration, betterstack_incidents_splunk_on_call_integration, betterstack_metadata, betterstack_monitor, betterstack_monitor_group, betterstack_on_call_rotation, betterstack_on_call_schedule, betterstack_severity, betterstack_severity_group, betterstack_status_page, betterstack_status_page_group

Telemetry (16): betterstack_alert, betterstack_aws_log_group_subscription, betterstack_collector, betterstack_collector_target, betterstack_connection, betterstack_dashboard, betterstack_dashboard_chart, betterstack_dashboard_group, betterstack_dashboard_section, betterstack_exploration, betterstack_exploration_group, betterstack_extracted_metric, betterstack_source, betterstack_source_aws_account, betterstack_source_gcp_project, betterstack_source_group

Errors (7): betterstack_application, betterstack_application_group, betterstack_errors_jira_integration, betterstack_errors_linear_integration, betterstack_errors_microsoft_teams_integration, betterstack_errors_slack_integration, betterstack_release

Teams and account (2): betterstack_team, betterstack_team_member

About this repository

This repository is published from Better Stack's API description, where the provider is built and tested: each release replaces its contents. Please report bugs and requests in this repository's issues.

Licensed under Apache-2.0 (LICENSE).

About

Terraform provider for managing uptime monitoring, on-call, status pages, logs, metrics and errors in Better Stack

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages