When someone runs cloudquery init aws we generate the following configuration:
cloudquery {
provider "aws" {
version = "latest"
}
....
This means that if we break providers we automatically break all existing versions of CloudQuery that use the default setting.
A possible solution will be to use:
cloudquery {
provider "aws" {
version = "~0.12.8"
}
....
If we add range support, this will prevent us from breaking existing CloudQuery versions when breaking providers, while still ensuring updates to latest patch version.
This solution assumes the user is running on a recent version of CloudQuery that supports the latest provider during init. To support matching old CloudQuery versions to supported providers we'll need a different mechanism.
We could even print a notice that a newer provider version exists, but say it's a breaking one and require an update to the core (and might also require other migrations like config changes, updating postgres, etc.)