Hey, I'm getting an error when trying to move reso...
# general
c
Hey, I'm getting an error when trying to move resources using the urn field. I'm using C#, and I'm on the latest stable version of the CLI and Nuget package. The error:
Copy code
Grpc.Core.RpcException: Status(StatusCode="Unknown", Detail="invocation of pulumi:pulumi:getResource returned an error: unknown resource urn:pulumi:live::devops::kubernetes:apps/v1:Deployment::minio")
       at async Task<InvokeResponse> Pulumi.GrpcMonitor.InvokeAsync(ResourceInvokeRequest request)
       at async Task<SerializationResult> Pulumi.Deployment.InvokeRawAsync(string token, SerializationResult argsSerializationResult, InvokeOptions options, RegisterPackageRequest registerPackageRequest) x 2
       at async Task<(string urn, string id, Struct data, ImmutableDictionary<string, ImmutableHashSet<Resource>> dependencies, Result result)> Pulumi.Deployment.ReadOrRegisterResourceAsync(Resource resource, bool remote, Func<string, Resource> newDependency, ResourceArgs args, ResourceOptions options, RegisterPackageRequest registerPackageRequest)
       at async Task Pulumi.Deployment.CompleteResourceAsync(Resource resource, bool remote, Func<string, Resource> newDependency, ResourceArgs args, ResourceOptions options, ImmutableDictionary<string, IOutputCompletionSource> completionSources, RegisterPackageRequest registerPackageRequest)
       at async Task<OutputData<U>> Pulumi.Output<T>.ApplyHelperAsync<U>(Task<OutputData<T>> dataTask, Func<T, Output<U>> func) x 2
       at async Task<T> Pulumi.Output<T>.GetValueAsync(T whenUnknown)
       at async Task<string> Pulumi.Deployment+EngineLogger.TryGetResourceUrnAsync(Resource resource)
The Urn I'm attempting to move is listed in the stack output and I copied the Urn directly from the
pulumi about
output:
Copy code
...
kubernetes:apps/v1:Deployment                        urn:pulumi:live::devops::kubernetes:apps/v1:Deployment::minio
...
Here's how I'm defining the CustomResourceOptions:
Copy code
var cluster = new Pulumi.Kubernetes.Apps.V1.Deployment( name, new DeploymentArgs {
    // etc. ...
}, new CustomResourceOptions {
    Urn = "urn:pulumi:live::devops::kubernetes:apps/v1:Deployment::minio",
    Parent = this,
    Provider = options?.Provider
} );
Pulumi clearly knows about this resource until it tries to find it when updating the stack. What gives?
I'm trying to move three resources (one k8s deployment, two k8s services) and they all "can't be found"
I unblocked myself by bringing the whole stack down and back up again (was a test cluster). I can try to recreate the problem if someone wants me to try something specific.