The purpose of CloudFormstion is not to tell AWS how to do something it’s to tell it the end state. How do you propose using a programming language where you can just change a resource and let the system figure out current state -> desired state and decide what needs to be created, updated, deleted, replaced?
But there are CloudFormation Linters.
https://marketplace.visualstudio.com/itemdetails?itemName=kd...
And there is also the CF editor for Visual Studio.
https://docs.aws.amazon.com/toolkit-for-visual-studio/latest...