terraform-provider: validate image and microservice version (#2766)

This commit is contained in:
Adrian Stobbe 2023-12-22 10:24:13 +01:00 committed by GitHub
parent 519efe637d
commit 436e7c6d3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 128 additions and 13 deletions

View file

@ -690,7 +690,8 @@ func msgFromCompatibilityError(err error, binaryVersion, fieldValue string) stri
}
}
func validateMicroserviceVersion(binaryVersion, version consemver.Semver) error {
// ValidateMicroserviceVersion checks that the version of the microservice is compatible with the binary version.
func ValidateMicroserviceVersion(binaryVersion, version consemver.Semver) error {
// Major versions always have to match.
if binaryVersion.Major() != version.Major() {
return compatibility.ErrMajorMismatch