Coder Social home page Coder Social logo

nobl9 / terraform-provider-nobl9 Goto Github PK

View Code? Open in Web Editor NEW
24.0 6.0 1.0 795 KB

Terraform provider for Nobl9

Home Page: https://www.nobl9.com

License: Mozilla Public License 2.0

Go 97.27% Makefile 1.71% Shell 0.33% JavaScript 0.63% Awk 0.06%
observability slo sre monitoring metrics google-slo openslo reliability reliability-engineering nobl9

terraform-provider-nobl9's Introduction

N9

checks tests vulnerabilities

Nobl9 Terraform Provider.

Requirements

Example

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

provider "nobl9" {
  client_id = "<CLIENT_ID>"
  client_secret = "<CLIENT_SECRET>"
}

resource "nobl9_project" "test" {
  name = "test"
}

resource "nobl9_service" "test" {
  name    = "test"
  project = "test"
}

Documentation

Generated documentation is located under docs folder.

Developers' documentation sits under dev-docs folder.

terraform-provider-nobl9's People

Contributors

altar64 avatar bdw-nobl9 avatar bsski avatar danstan9 avatar davex98 avatar dawidwisn avatar dependabot[bot] avatar devinodaniel avatar ian-bartholomew avatar jakub-m-sobczak avatar kingakis avatar klaudia-nobl9 avatar kskitek avatar kubaceg avatar kuklyy avatar labtom avatar lukasz-dobek avatar michalfilik avatar mkaras-nobl9 avatar natalialanga avatar nieomylnieja avatar nikodemrafalski avatar nobl9-adam-szymanski avatar nuusk avatar remilis avatar renovate[bot] avatar skrolikiewicz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

devinodaniel

terraform-provider-nobl9's Issues

[feature request] SLO AWS CloudWatch support

Dear Nobl9 team,

would it be possible to soon add AWS Cloudwatch support to the nobl9_slo resource?
That would save us many many yaml files and make managing SLOs a lot easier and efficient.

Best, Felix

Unable to create SLOs with historicalDataRetrieval and agent

Trying to use the Terraform provider to manage my Nobl9 objects. Specifically, I was trying to create my agents (Splunk) and some SLOs. Unfortunately, it does not look like we can specify the historicalDataRetrieval (reimport) settings on the SLO, so they default to 0. That means we're unable to reimport data, which makes using TF pretty much a non-starter for us. Is there a target release for when this support will be added?

SLOs set labels

Hi Nobl9 team,

I am currently building SLOs transitioning from yaml to terraform.
Is it possible to set (multiple) labels for SLOs or is it just missing in the documentation?

Thanks for your help
Felix

SLO time_windows always redeployed period with is_rolling = true

Hi Nobl9 team,

I am currently building SLOs transitioning from yaml to terraform.
I set the time_window to a rolling 14 day window.

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

When I deploy it and run terraform apply afterwards the time_window is always again redeployed with new period values. As the window is rolling that does not make sense and is just confusing as nothing changed in the code and the period is handled serverside.

image

Thanks for your help
Felix

Plugin crashes while creating nobl9_slo

Hey, I'm trying to create a new SLO with the nobl9_slo resource using terraform v1.4:

resource "nobl9_slo" "error_5xx" {
  name = "frontend-errors-5xx"
  display_name = "Frontend - Errors 5xx"
  service = "my-service"
  project = "my-project"
  budgeting_method = "Occurrences"


  label {
    key    = "team"
    values = ["my-team"]
  }

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

  objective {
    display_name = "Good"
    target       = 0.99
    value        = 3
    op           = "lte"
    count_metrics {
      incremental = false
      good {
        cloudwatch {
          region      = "us-east-1"
          namespace   = "AWS/CloudFront"
          metric_name = "5xxErrorRate"
          stat        = "Average"
          dimensions {
            name  = "Region"
            value = "Global"
          }
          dimensions {
            name  = "DistrubutionId"
            value = "A1234567890"
          }
        }
      }
    }
  }

  indicator {
    name    = "my-name"
    kind    = "Direct"
    project = "my-project"
  }
}

After executing terraform the following error appears:

nobl9_slo.frontend_error_5xx: Creating...
╷
│ Error: Plugin did not respond
│ 
│   with nobl9_slo.frontend_error_5xx,
│   on slo.frontend.error-5xx.tf line 1, in resource "nobl9_slo" "frontend_error_5xx":
│    1: resource "nobl9_slo" "frontend_error_5xx" {
│ 
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain more details.
╵

Stack trace from the terraform-provider-nobl9_v0.9.0 plugin:

panic: runtime error: index out of range [0] with length 0

goroutine 42 [running]:
github.com/nobl9/terraform-provider-nobl9/nobl9.marshalCountMetrics(0x1780e00?)
        github.com/nobl9/terraform-provider-nobl9/nobl9/resource_slo.go:618 +0x25a
github.com/nobl9/terraform-provider-nobl9/nobl9.marshalThresholds(0x0?)
        github.com/nobl9/terraform-provider-nobl9/nobl9/resource_slo.go:582 +0x2e7
github.com/nobl9/terraform-provider-nobl9/nobl9.marshalSLO(0x186c7dc?)
        github.com/nobl9/terraform-provider-nobl9/nobl9/resource_slo.go:474 +0x245
github.com/nobl9/terraform-provider-nobl9/nobl9.resourceSLOApply({0x198d250, 0xc00010dec0}, 0x0?, {0x1822400?, 0xc00035e620})
        github.com/nobl9/terraform-provider-nobl9/nobl9/resource_slo.go:328 +0x15f
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0xc00044b7a0, {0x198d288, 0xc0003b48a0}, 0xd?, {0x1822400, 0xc00035e620})
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:707 +0x12e
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc00044b7a0, {0x198d288, 0xc0003b48a0}, 0xc0002149c0, 0xc00047e280, {0x1822400, 0xc00035e620})
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:837 +0xa7a
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc00042a228, {0x198d288?, 0xc0003b4780?}, 0xc0007303c0)
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:1021 +0xe3c
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc0003dab40, {0x198d288?, 0xc00017dc50?}, 0xc0001b8070)
        github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:813 +0x4fc
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x1830840?, 0xc0003dab40}, {0x198d288, 0xc00017dc50}, 0xc0001b8000, 0x0)
        github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:385 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000408000, {0x19902f0, 0xc0004824e0}, 0xc000012000, 0xc000421d70, 0x1e2e140, 0x0)
        google.golang.org/[email protected]/server.go:1295 +0xb0b
google.golang.org/grpc.(*Server).handleStream(0xc000408000, {0x19902f0, 0xc0004824e0}, 0xc000012000, 0x0)
        google.golang.org/[email protected]/server.go:1636 +0xa1b
google.golang.org/grpc.(*Server).serveStreams.func1.2()
        google.golang.org/[email protected]/server.go:932 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
        google.golang.org/[email protected]/server.go:930 +0x28a

Error: The terraform-provider-nobl9_v0.9.0 plugin crashed!

[BUG] Errors from marshaling agent are not returned to user due to incorrect 'diags' handling

Describe the bug
Diagnostics (diags) in marshalAgent func in resource_agent.go are not being correctly passed between functions, leading to errors not being returned to the user. The issue might also be present in more places - needs more investigation.

To Reproduce
Do any behavior that should result in getting an error in marshalAgent func in resource_agent.go.

Expected behavior
Errors encountered should be captured in diags and returned to the user.

System details

  • All Terraform Provider versions

Additional context
Issue added for visibility, will be taken care of.

OP condition attribute in Alert Policy

Hi Nobl9 team,

I am currently building SLOs transitioning from yaml to terraform.
Is the "op" attribute inside condition missing in the alert policy resource or is it just missing in the documentation?

Thanks for your help
Felix

SLO impossible to delete alert_policies

Hi Nobl9 team,

I am currently building SLOs transitioning from yaml to terraform.
When I deploy SLOs with an alert policy set and then try to remove it with alert_policies = null nothing happens.
The cli output of terraform just says No Changes and nothing to do. According to the documentation and also the web ui alert policies in SLOs are optional and it should be possible to be removed.

Thanks for your help
Felix

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

github-actions
.github/workflows/acc-tests.yml
  • actions/checkout v4
  • actions/setup-go v5
.github/workflows/checks.yml
  • actions/checkout v4
  • actions/setup-go v5
  • actions/setup-node v4
  • actions/cache v4
.github/workflows/pr-title.yml
  • Slashgear/action-check-pr-title v4.3.0
.github/workflows/release-drafter.yml
  • actions/checkout v4
  • release-drafter/release-drafter v6
.github/workflows/release.yml
  • actions/checkout v4.1.6
  • actions/setup-go v5
  • goreleaser/goreleaser-action v5.1.0
.github/workflows/unit-tests.yml
  • actions/checkout v4
  • actions/setup-go v5
.github/workflows/vulns.yml
  • actions/checkout v4
  • actions/setup-go v5
gomod
go.mod
  • go 1.22
  • github.com/google/uuid v1.6.0
  • github.com/hashicorp/terraform-plugin-docs v0.19.2
  • github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0
  • github.com/nobl9/nobl9-go v0.81.0
  • github.com/stretchr/testify v1.9.0
  • github.com/teambition/rrule-go v1.8.2
npm
package.json
  • cspell 8.8.1
  • markdownlint-cli 0.40.0
  • yaml 2.4.2
  • yarn 1.22.22
regex
Makefile
  • securego/gosec v2.20.0
  • golangci/golangci-lint v1.58.1
  • golang.org/x/vuln/cmd/govulncheck v1.1.0
  • golang.org/x/tools/cmd/goimports v0.21.0
  • segmentio/golines v0.12.2
terraform
examples/provider/provider.tf

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.