You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attribute traffic_type value must be one of: ["LIVE" "LIVE_VOD"
"WEB_STANDARD_TLS" "WEB_ENHANCED_TLS"], got: "TEST"
Actual Behavior
Attribute traffic_type value must be one of: ["\"LIVE\"" "\"LIVE_VOD\""
"\"WEB_STANDARD_TLS\"" "\"WEB_ENHANCED_TLS\""], got: "TEST"
Steps to Reproduce
.
Logs
No response
Additional Information
The problem is that MarkdownDescription function for OneOf validator is using %q to escape and build string representation for the array of strings. In normal situation it would work perfectly when the values are defined as []string. However this validator is using values defined as []types.String and types.String has its own implementation of String() function which is also escaping the string value using %q. As the result there is double escaping, generating confusing \" in the output message.
Please modify MarkdownDescription and implement own concatenation of string values. I guess similar issue is for other string validators.
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
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.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Terraform CLI and Framework Versions
Terraform v1.4.5
github.com/hashicorp/terraform-plugin-framework v1.2.0
Terraform Plugin Framework Code
Terraform Configuration
Expected Behavior
Actual Behavior
Steps to Reproduce
.
Logs
No response
Additional Information
The problem is that
MarkdownDescription
function forOneOf
validator is using%q
to escape and build string representation for the array of strings. In normal situation it would work perfectly when thevalues
are defined as[]string
. However this validator is usingvalues
defined as[]types.String
andtypes.String
has its own implementation ofString()
function which is also escaping the string value using%q
. As the result there is double escaping, generating confusing\"
in the output message.Please modify
MarkdownDescription
and implement own concatenation of string values. I guess similar issue is for other string validators.Code of Conduct
The text was updated successfully, but these errors were encountered: