Closed guy-radford-sunswap closed 1 year ago
Hi there and thank you for reporting this. This is an interesting one. I'll try to reproduce it locally to see if there's something weird happening. Funky part is that Read
seems to return version column as an array..
We see this one internally a lot. I just haven't gotten around to fixing it (By using some hacky DiffSupression). Essentially the escaping is automatically removed by ADX if not needed for characters like '-' and state is updated accordingly which causes the change on next plan.
Looking at it again, it actually seems to be the reverse problem. version
might be a type of keyword in ADX and it's trying to escape it for you. Some more research is obviously required for this one (DiffSupression still might fix).
@guy-radford-sunswap if you rename the column from version
to something else - does the effect persist?
Also, if version
is a keyword - do we want to prohibit columns with that name or kludge around it?
ADX allows you to name a column basically anything as long as its escaped. I haven't figured out an elegant solution just yet.
Normalize everything to escaped form during read and in the state?
Yeah I was thinking we just add a diff suppression function on the name where we perform the following:
One question though, is if the input is not escaped and it should be, do we escape it for them to avoid the error from ADX? Some inputs like dashes and other characters ADX will NOT auto-escape for you.
Nearly finished with this one. When i added a few acceptance tests to reproduce the above I found some additional bugs related to adding new columns to an existing table (they aren't added properly).
@guy-radford-sunswap if you rename the column from
version
to something else - does the effect persist? Also, ifversion
is a keyword - do we want to prohibit columns with that name or kludge around it?
Ill give it ago when I next to a rebuild, probably wont be today...sorry I missed this the other day.
Is there an existing issue for this?
Terraform Version
v1.3.7
ADX Provider Version
v0.0.18
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
I would expect the version field to not require changing, this has not chnage since a complete re-build.
Actual Behaviour
TF suggest the
version
field needs updating, even when it does not.Thank you
Steps to Reproduce
No response
Important Factoids
No response
References
No response