Documentation
¶
Index ¶
- func AtLeastOneChildConfigured(attributeNames ...string) validator.Object
- func ConflictsIfMatchesPathValue(targetValue basetypes.StringValue, expressions ...path.Expression) validator.Object
- func IsRequiredIfMatchesPathValue(targetValue attr.Value, expressions ...path.Expression) validator.Object
- type AtLeastOneChildConfiguredValidator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AtLeastOneChildConfigured ¶ added in v1.13.0
func ConflictsIfMatchesPathValue ¶ added in v0.16.0
func ConflictsIfMatchesPathValue(targetValue basetypes.StringValue, expressions ...path.Expression) validator.Object
func IsRequiredIfMatchesPathValue ¶
func IsRequiredIfMatchesPathValue(targetValue attr.Value, expressions ...path.Expression) validator.Object
IsRequiredIfMatchesPathValue validates if the provided attribute value equals the value at the provided path expression(s). If matched, the current argument is required.
If a list of expressions is provided, all expressions are checked until a match is found, or the list of expressions is exhausted.
Types ¶
type AtLeastOneChildConfiguredValidator ¶ added in v1.13.0
type AtLeastOneChildConfiguredValidator struct {
AttributeNames []string
}
AtLeastOneChildConfiguredValidator validates that if an object is configured, at least one of the specified nested attributes must be configured (not null). This prevents empty object blocks in Terraform configurations.
func (AtLeastOneChildConfiguredValidator) Description ¶ added in v1.13.0
func (v AtLeastOneChildConfiguredValidator) Description(_ context.Context) string
func (AtLeastOneChildConfiguredValidator) MarkdownDescription ¶ added in v1.13.0
func (v AtLeastOneChildConfiguredValidator) MarkdownDescription(ctx context.Context) string
func (AtLeastOneChildConfiguredValidator) ValidateObject ¶ added in v1.13.0
func (v AtLeastOneChildConfiguredValidator) ValidateObject(ctx context.Context, req validator.ObjectRequest, resp *validator.ObjectResponse)
Click to show internal directories.
Click to hide internal directories.