Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
provider/aws: normalize json policy for sns topic
For the policy attribute of the resource aws_sns_topic, AWS returns the policy in JSON format with the fields in a different order. If we store and compare the values without normalizing, terraform will unnecesary trigger and update of the resource. To avoid that, we must add a normalization function in the StateFunc of the policy attribute and also when we read the attribute from AWS.
- Loading branch information