Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Conditional Config Values #466
I know this is probably more of a PSFramework issue, but it's born out of a desire to use dbachecks more effectively at my company, so I figured opening an Issue here was appropriate.
I'd love to store a
Ideally, I'd like to do this:
Obviously a couple challenges there:
Right now, I'm doing roughly this to accomplish the same thing:
There's been a lot of creative uses involving different wrappers around dbachecks. In particular, Claudio's parallel workloads and Tony's work seen here, so if the solution to my problem is to continue using my wrapper as-is, that's completely fine. That technique is made even easier now that
A few other use cases:
It occurred to me while thinking though those potential use cases that 90% of what I'd want to dynamically set is conditional on the database name, so maybe it would be helpful to say that's the only kind of conditional comparison that could be done in a ScriptBlock.
It's also worth pointing out that this is largely because I want to
This is an interesting idea. I do not know if this is possible with PSFramework but we can ask @FriedrichWeinmann :-)
My gut feeling is that it probably should stay as something that can be achieved with a wrapper, to avoid any confusion for simpler use cases but lets see what Fred has to say on the matter
Heya, this is a really fun idea!
I can tell you right now, that this is not yet possible, but I like it a lot.
Either solution would lead to two new config parameters:
Anyway, now that somebody has set that bee in my head, this is going to happen. Not today, and not with the current update still pending validation, but it's on the list: