-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Question) Adding ConflictsWith
for Provider Block
#838
Comments
Hi @BBBmau 👋 Thank you for raising this.
That is one potential solution. Providers do not have a "planning" phase, only configuration validation and configuration calls from Terraform. More details about provider configuration validation can be found in the framework website documentation.
The terraform-plugin-framework-validators Go module contains validators such as So for example: import (
"github.com/hashicorp/terraform-plugin-framework-validators/providervalidator"
)
func (p ExampleProvider) ConfigValidators(ctx context.Context) []provider.ConfigValidator {
return []provider.ConfigValidator{
providervalidator.Conflicting(
path.MatchRoot("config_path"),
path.MatchRoot("config_paths"),
),
}
} Is this what you are looking for in this case? |
This is what I was looking for, thank you! I saw that the docs provided this here, https://developer.hashicorp.com/terraform/plugin/framework/resources/validate-configuration I'll do a more extensive search within the docs the next time around. Thank you for getting back to me! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Description
When working on migrating the
helm
provider to the plugin-framework, I noticed that theres no support for aConflictsWith
feature when configuring the provider.Is this due to the expectation that any provider configuration being done such as setting default values and also checking for conflicts should be done within the
Configure
function? I ask this due to the response fromDefaultValues
#539
Use-cases
ConfigPath
andConfigPaths
can conflict with one another within the provider configuration. This is a simple check within the provider configure function, although I want to open this issue for those that run into a similar situation where more Conflicts could arise when developing providers using the plugin-frameworkThe text was updated successfully, but these errors were encountered: