terraform-ibm-modules / terraform-ibm-observability-da

A deployable architecture solution to deploy Observability instances and agents.
Apache License 2.0
0 stars 1 forks source link

Observability DA code getting extremly complex to follow #182

Open ocofaigh opened 1 day ago

ocofaigh commented 1 day ago

The code in https://github.com/terraform-ibm-modules/terraform-ibm-observability-da/tree/main/solutions/instances is getting far to hard to follow and maintain. Can we do anything about it? For sure we can add better code comments anyway

iamar7 commented 1 day ago

@ocofaigh if we remove the log_analysis content from the code then it will get slightly better. Also, we can move some parts from the local block and add some comments for better understanding.

ocofaigh commented 1 day ago

@iamar7 yes its coming (I have a local branch) - but its not a huge deal better tbh. More code comments needed anyway

ocofaigh commented 1 day ago

@iamar7 please don't start work yet on this - we have a backlog of PRs to get in first

iamar7 commented 1 day ago

@iamar7 please don't start work yet on this - we have a backlog of PRs to get in first

Yes, I have took it since I have some ideas for restructuring the module. I will start working on it when most of the backlog PR's get merged.

ocofaigh commented 1 day ago

@iamar7 Another thing that will help is when we move to tf 1.9, we can remove all that validation logic and have it in the variables.tf file directly using the cross reference validation feature. We could also try to start using the CRN parser module for the parsing we currently do with regex.