```const image = `${infra.containers.name.apply(x ...
# general
s
Copy code
const image = `${infra.containers.name.apply(x => x)}.<http://azurecr.io/test:0.1.1|azurecr.io/test:0.1.1>`
s
You might want:
Copy code
const image = infra.containers.name.apply(x => `${x}.<http://azurecr.io/test.io:0.1.1`)|azurecr.io/test.io:0.1.1`)>
there
s
yeah great thanks
even with that though, the local state is still corrupt
and it wont update
c
What is the error now?
s
Copy code
Diagnostics:
  kubernetes:apps:Deployment: test
    error: Preview failed: 5 errors occurred:

    * Resource 'test' was created but failed to initialize
    * [MinimumReplicasUnavailable] Deployment does not have minimum availability.
    * [ProgressDeadlineExceeded] ReplicaSet "test-648575886b" has timed out progressing.
    * Minimum number of live Pods was not attained
    * 1 Pods failed to run because: [InvalidImageName] Failed to apply default image tag "[object Object].<http://azurecr.io/test:0.1.1|azurecr.io/test:0.1.1>": couldn't parse image reference "[object Object].<http://azurecr.io/test:0.1.1|azurecr.io/test:0.1.1>": invalid reference format

error: an error occurred while advancing the preview
Copy code
const name = "test";
const image = "<http://testcontainer.azurecr.io/test:0.1.1|testcontainer.azurecr.io/test:0.1.1>";
const labels = {
    "app": "test"
};

export const deployment = new k8s.apps.v1.Deployment(name, {
    metadata: {
        namespace: namespace.metadata.apply(x => x.name),
        name: name,
        labels: labels,
    },
    spec: {
        selector: { matchLabels: labels },
        replicas: 1,
        template: {
            namespace: namespace.metadata.apply(x => x.name),
            metadata: { labels: labels },
            spec: {
                containers: [{
                    name: name,
                    image: image,
                    ports: [{
                        containerPort: 80
                    }],
                }]
            }
        }
    }
}, { provider: milestone1Cluster.provider });
c
Hmm. Why do you think this is a state corruption issue
s
well i just dont know how to make it forget it ever said [object Objet] in there
because it's definitely hardcoded now
c
What diff does preview give?
s
preview just says the 1 change
hmm is it just hte -r thats breaking it
"pulumi up" seems ok, i'm so used to typing the -r
c
Refresh should fail
The resource is in a state is error
s
ahh right ok well sorry about that
c
Nbd
Something to think about. Errors might use some improvement
s
i thought -r did the same thing but more conservatively
c
that’s good feedback, thanks.
need to think more about refresh’s flow…
s
great all working again, thanks a lot for the help!