canonical / canonical/observability-stack

Guidelines for cos(-lite) integration to other products terraform

Open
#50 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
HCL
Stars
9
Forks
12
Avg merge
2d 40m
Merged PRs (30d)
3

Description

Hello,

I'm looking for some guidelines as to how to add cos(-lite) integration to another product's terraform module.

I'm writing a terraform module for a product which happen to be observable by COS. With both COS and my own product providing their respective terraform module which, I assume, are both called in a common root, how can those 2 modules be integrated as neatly as possible ?

I'm thus wondering if there are some guidelines, established patterns regarding how to declare that (optional) integration.

Should I e.g. :

- ~offer all the COS-related endpoints (`juju_offer` ressources + module output for the offers) ?~
- deploy a grafana agent alongside my product, integrate to it and and only offer grafana-agent endpoints ?
- ~leave it entirely to the root ? ( which feels like a missed opportunity)~

Some more questions:

- Should the COS integration live in my `main` or maybe in a separate `cos-integration.tf` file ?
- Should it be optional ? If so, how would I do that ? Using `count` in all related ressources ?

I understand that there might not be a one-fit-them-all design but I'm sure there are some good practices out there :)

Thanks.

Edit: I found part of the answer in the spec document (grafana agent + offer).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.