fix: default_role should ignore diffs of the form "thing" -> "\"thing\"" #2836
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We have a few roles in our org that have spaces or other special characters in them. We can't get around this, so we decided default_role should be escaped. In our Terragrunt module, we wrap it in "\"${role_name}\"", and everyone's happy. However, it means that we get a permanent diff of the form "${role_name} -> "\"${role_name}\"".
Before we started wrapping them like this, we got gnarly SQL errors on apply. Perhaps the real issue was that the provider should have been handling sending default_role wrapped in escaped quotes, as I can see occurs for other fields? In any case, this patch only suppresses diffs of the form mentioned, and doesn't alter anything else in that way.
Test Plan
This PR is UNTESTED!. It needs to be tested on my other machine before being considered for merge, but I wanted to check first to make sure I'm not going about this in the wrong way. Thanks!
References