Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: PC-11745 Add primary objective terraform support #202

Merged
merged 7 commits into from
Apr 8, 2024

Conversation

natalialanga
Copy link
Contributor

@natalialanga natalialanga commented Mar 20, 2024

Release Notes

Expose new field 'primary' to highlight a specific objective in an SLO.

Summary

Add primary objective terraform support

Related changes

nobl9/nobl9-go#330
nobl9/sloctl#83

Testing

Build a local provider with make install and use the sample .tf file for testing.

Sample .tf file:

terraform {
  required_providers {
    nobl9 = {
      source  = "nobl9.com/nobl9/nobl9"
      version = "0.25.0"
    }
  }
}

// Fill using nobl9 auth configuration
provider "nobl9" {
  ingest_url       = ""
  okta_org_url     = ""
  okta_auth_server = ""
  client_id        = ""
  client_secret    = ""
}

resource "nobl9_slo" "this" {
  name             = "slo"
  service          = "service"
  budgeting_method = "Occurrences"
  project          = "project"

  time_window {
    unit       = "Day"
    count      = 30
    is_rolling = true
  }

  objective {
    name         = "obj-1"
    target       = 0.99
    value        = 2000
    op           = "gte"
    primary      = true

    raw_metric {
      query {
        prometheus {
          promql = "query"
        }
      }
    }
  }

  indicator {
    name = "test-prom-agent"
  }
}

@n9-machine-user n9-machine-user added enhancement New feature or request go Pull requests that update Go code minor New functionality with at most minor breaking changes labels Mar 20, 2024
@paulina-n9
Copy link
Contributor

lgtm 👌🏻

@paulina-n9 paulina-n9 added the passed-testing Added by QA when tests have passed label Mar 27, 2024
natalialanga added a commit to nobl9/sloctl that referenced this pull request Mar 29, 2024
lukasz-dobek
lukasz-dobek previously approved these changes Apr 8, 2024
Copy link
Contributor

@lukasz-dobek lukasz-dobek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, with the assumption that we will release 0.25 😄

@natalialanga natalialanga merged commit 612b330 into main Apr 8, 2024
7 checks passed
@natalialanga natalialanga deleted the PC-11745-slo-primary-objective branch April 8, 2024 10:25
BSski pushed a commit to nobl9/sloctl that referenced this pull request May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request go Pull requests that update Go code minor New functionality with at most minor breaking changes passed-testing Added by QA when tests have passed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants