terraform-provider-splunk
terraform-provider-splunk copied to clipboard
FR: Support disabled mode for provider / lazy login only when used
Hi,
we have the need to use this provider only on certain environment
provider "splunk" {
url = try(local.env_url,"")
auth_token = try(local.auth_token,"")
}
The resources that use that provider use count to make sure that they don't run on the non-supported env.
The problem is that today there's no way to configure the provider with dummy values as it performs the login during the configureProvider method.
Suggestions:
- [better] Perform the login only on first usage (lazy login)
- [alt] Skip login in case url is empty or introduce a new property called
enabled(IMO less preferable)