Open jar-b opened 11 months ago
Voting for Prioritization
Volunteering to Work on This Issue
Worth noting that unlike the JSON arguments in the iam
package, these policy
values are sent directly to the AWS API as-is rather than being normalized to suppress differences. Assuming AWS detects duplicate keys this enhancement wouldn't add new security, simply a cleaner provider-generated message when invalid values are provided.
Description
The OpenSearch Serverless access policy and security policy resources currently only validate length limits for their respective
policy
arguments. Confirming the string is valid JSON and contains no duplicate keys could produce improved error messaging for practitioners.https://github.com/hashicorp/terraform-provider-aws/blob/c611551eff6d062ae985126576a99b14aaba7be7/internal/service/opensearchserverless/access_policy.go#L78-L83
https://github.com/hashicorp/terraform-provider-aws/blob/c611551eff6d062ae985126576a99b14aaba7be7/internal/service/opensearchserverless/security_policy.go#L78-L83
Affected Resource(s) and/or Data Source(s)
aws_opensearchserverless_access_policy
aws_opensearchserverless_security_policy
Potential Terraform Configuration
No response
References
Relates #33026
Would you like to implement a fix?
None