Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion provider/pkg/gen/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ func PulumiSchema(rootDir string, modules openapi.AzureModules, versioning Versi
// When a resource maps to more than one API path, it's a conflict and we need to detect and report it. #2495
isReleaseBuild := len(providerVersion.Build) == 0
if providerVersion.Major >= 3 && isReleaseBuild && resourcesPathTracker.hasConflicts() {
return nil, fmt.Errorf("path conflicts detected. You probably need to add a case to schema.go/dedupResourceNameByPath.\n%+v", resourcesPathTracker.pathConflicts)
return nil, fmt.Errorf("path conflicts detected. You probably need to add a case to resources.go/ResourceName.\n%+v", resourcesPathTracker.pathConflicts)
}

err := genMixins(&pkg, &metadata)
Expand Down
12 changes: 5 additions & 7 deletions provider/pkg/provider/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,19 +212,17 @@ func getAzVersion() (*goversion.Version, error) {
}

func assertAzVersion(version *goversion.Version) error {
const versionHint = `Please make sure that the Azure CLI is installed in a version either
between 2.0.81 and 2.33, or at least 2.37 but less than 3.x; or configure another authentication
method. See https://www.pulumi.com/registry/packages/azure-native/installation-configuration/#credentials
const versionHint = `Please make sure that the Azure CLI is installed in a version of at least 2.37 but less than
3.x; or configure another authentication method. See
https://www.pulumi.com/registry/packages/azure-native/installation-configuration/#credentials
for more information.`

// We need this version because it doesn't print the error of #1565
lowerOkRange := goversion.MustConstraints(goversion.NewConstraint(">=2.0.81, <2.34"))
upperOkRange := goversion.MustConstraints(goversion.NewConstraint(">=2.37.0, <3"))
versionRange := goversion.MustConstraints(goversion.NewConstraint(">=2.37.0, <3"))

if !lowerOkRange.Check(version) && !upperOkRange.Check(version) {
if !versionRange.Check(version) {
return fmt.Errorf("found incompatible az version %s. %s", version, versionHint)
}

return nil
}

Expand Down
3 changes: 1 addition & 2 deletions provider/pkg/provider/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ import (

func TestAcceptedAzVersions(t *testing.T) {
goodVersions := []string{
"2.0.81", "2.0.82", "2.1.81", "2.20", "2.33", "2.33.9",
"2.37", "2.37.1", "2.38", "2.40", "2.99.99",
}
badVersions := []string{
"1",
"2", "2.0.80", "2.34", "2.34.1", "2.35", "2.36", "2.36.6",
"2", "2.0.80", "2.0.81", "2.1.81", "2.20", "2.33", "2.36.6",
"3", "3.0.1", "3.5",
"4",
}
Expand Down