nobl9/terraform-provider-nobl9

Unable to create SLOs with historicalDataRetrieval and agent

nycjay opened this issue · 7 comments

nycjay commented

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?

BSski commented

Hi! As it was discussed on Slack:

First, for replay (historical data retrieval) to work you need two things:

  • Prepare an Agent/Direct that allows running replay and has configured default and max duration
  • Make a request to run the replay

Only Direct configuration for the replay is supported by our terraform provider.
The request to run the replay is currently only available from the UI or from our sloctl tool - you can read more about that in our documentation https://docs.nobl9.com/sloctl-user-guide#replay

Feature for initiating replays via Terraform is planned but not yet available.

nycjay commented

@BSski I still do not see this working. I can create an agent using TF and specify the historical data retrieval configuration (and default value), and that seems to working as intended, as of PC-8600.

But any SLOs I then created using TR using that agent do not appear to pick up that default value, it remains hard coded to 0 and is unchangeable, so I am unable to initiate a replay.

If the SLO is created via the UI rather than TF, then I am able to specify the replay values.

@BSski - It is the same issue with me as well. I have configured the agent with the HistoricalDataRetreivel configuration but when I create the SLO it doesn't pass down to the SLO from the agent. sloctl has some specific command and arguments related to the replay but it seems that it is not supported in the TF.
Is there any possibility that it can be available under TF as well ?

nycjay commented

I want to take back what I said above. It looks like my testing was not thorough enough - I am able to run a replay after I create the agent and SLO via Terraform. Sorry for the confusion.

BSski commented

@nycjay If anything changes in the matter, please feel free to let us know. Thank you!

@OCTRAPUS I just want to make sure - is your issue solved too?

@BSski - Fortunately myself and @nycjay belongs to same team and was trying the same thing.
Yes now my SLO via terraform has taken the HistoricalData Config from the agent after changing my agent settings.
When can we expect the functionality of initiating the replay for my SLO via terraform? So that we can have some plan in our head while going forward with terraform.
Also When I create my SLO , it has the data historical configs but I have to go my UI to import that, I was under impression that as soon as I will create my SLO, it will fetch my historical data as well. Is it something I am missing while creating the SLO or does it come under functionality of initiating the replay?

BSski commented

I am happy the initial issue is solved for you.

  1. Initiating replay via Terraform is on our upcoming roadmap and is expected this year.
  2. At the moment it's a part of initiating the replay functionality. You can initiate a replay via UI and our command line tool - sloctl. You can also have replay run immediately after creating the SLO via UI, or by using sloctl apply -f ./slo.yaml --replay --from=2024-01-01T15:00:00Z in sloctl.