I need help with making pulumi related provider / ...
# 💻|contributing
p
I need help with making pulumi related provider / module fields mutually exclusive. Could someone point me on how to achieve it?
For example: - if
backendURL
is set to a value a that doesn't contain https://api.pulumi.com or https://app.pulumi.com and
orgName
is set either in providerConfig or moduleConfig, I would like to fail garden during the validate phase and display an error message - if
backendURL
is set to a value a that doesn't contain https://api.pulumi.com or https://app.pulumi.com and
cacheStatus; true
is set in moduleConfig, I would like to fail garden during the validate phase and display an error message
https://github.com/garden-io/garden/pull/4107 is the PR with related changes. CC: @ancient-diamond-80011 (since I saw you were updating pulumi related docs in Bonsai branch)
a
joi
has some capability for
.xor()
validation and we use it in some places in the codebase, but your usecase sounds a bit more complex than that
and
oxor()
for optional exclusive or
p
Thank you! Paired with @big-spring-14945 and fixed the functionality. PR has been updated.