hello, when calling this function: ```export decla...
# typescript
b
hello, when calling this function:
Copy code
export declare function buildAndPushImage(imageName: string, pathOrBuild: pulumi.Input<string | DockerBuild>, repositoryUrl: pulumi.Input<string>, logResource: pulumi.Resource, connectToRegistry?: () => pulumi.Input<Registry>, skipPush?: boolean): pulumi.Output<string>;
what should I pass as "logResource"?
l
Not sure this is the right channel. What provider and kind of resource contains this function?
a
If you're not already aware, there are plenty of assumptions and autocreating defaults that pulumi does for you. I've only ever called that function with a name, and a directory with a
Dockerfile
in it.
Copy code
export function createImage() : RepositoryImage {
  return buildAndPushImage("myImageName", "./ApplicationFolder")
}
b
Sorry, this is from the "docker" provider @little-cartoon-10569
@acceptable-army-69872 i'm using this method as it let's me specify the imageName (first parameter) as opposed to the method you are referring to on the "Repository" class
l
The logResource parameter is passed to various log functions (debug, info etc.). It is used only to add a Pulumi URN to the logged output. You can safely omit it. If you want to add it, use any resource whose URN is appropriate to the log at that point. IMO: the image or the registry resources might be appropriate.
In fact, the registry URL is already being logged, so the image would be the most useful resource to pass in there, if you wanted to pass something.
b
thank you! i'll pass the repository