Skip to content

Commit 3482e36

Browse files
authored
Tell users to pulumi refresh --run-program when API versions have changed (#4502)
Because running `pulumi refresh` alone will use the old provider config from the state whereas users would want to use the provider specified in the program regardless of whether they upgrade or downgrade
2 parents 583d5d8 + a6fb5b0 commit 3482e36

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

provider/pkg/provider/provider.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,7 @@ func (k *azureNativeProvider) Diff(ctx context.Context, req *rpc.DiffRequest) (*
916916
}
917917

918918
// Check if API version has changed between state and current provider metadata.
919-
// If so, warn the user to run `pulumi refresh` for proper schema alignment.
919+
// If so, warn the user to run `pulumi refresh --run-program` for proper schema alignment.
920920
var oldApiVersion string
921921
if azureApiVersion, ok := oldState["azureApiVersion"]; ok && azureApiVersion.IsString() {
922922
oldApiVersion = azureApiVersion.StringValue()
@@ -926,7 +926,7 @@ func (k *azureNativeProvider) Diff(ctx context.Context, req *rpc.DiffRequest) (*
926926

927927
k.host.Log(ctx, diag.Warning, urn, fmt.Sprintf(
928928
"Resource API version has changed from %s to %s. "+
929-
"Run 'pulumi refresh' to update the resource state with the new API version schema.",
929+
"Run 'pulumi refresh --run-program' to update the resource state with the new API version schema.",
930930
oldApiVersion, res.APIVersion))
931931
}
932932
}

0 commit comments

Comments
 (0)