Closed polatengin closed 5 months ago
Why does the environment config trump the provider config? This is more of a "food for thought" question, as I've also added variable handling that uses this priority order, so not worth changing, but I wonder if we've gotten it backwards throughout the provider. I'm probably just not thinking of an obvious reason to do things in that priority order. Anywho, LGTM.
it's more like, the options that you can use to configure the plan/apply in the way you like.
so, instead of having how you authenticate hard-coded, you might want to configure it in the pipeline, based on the pipeline parameters, etc.
quick note; this change doesn't give priority to environment config, we still check if the config exists in the provider section, if yes, we use it, if no, we check the environment variables.
Why does the environment config trump the provider config? This is more of a "food for thought" question, as I've also added variable handling that uses this priority order, so not worth changing, but I wonder if we've gotten it backwards throughout the provider. I'm probably just not thinking of an obvious reason to do things in that priority order. Anywho, LGTM.
it's more like, the options that you can use to configure the plan/apply in the way you like.
so, instead of having how you authenticate hard-coded, you might want to configure it in the pipeline, based on the pipeline parameters, etc.
quick note; this change doesn't give priority to environment config, we still check if the config exists in the provider section, if yes, we use it, if no, we check the environment variables.
Ah, yep, I stared at it too long and lost the plot: we check if the config value is blank and only then would we use the environment variable, that makes more sense to me. I do basically the same thing with envOidcRequestUrl and envOidcRequestToken . Thanks for following up.
LGTM.
To be able to remove hard-coded
use_oidc = {true, false}
config from provider section, provider should be able to determine if a specific environment variable is set.Before;
After _(with
POWER_PLATFORM_USE_OIDC
environment variable is set)_;closes #329