https://pulumi.com logo
b

bland-byte-34481

03/09/2021, 7:45 PM
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

little-cartoon-10569

03/09/2021, 8:38 PM
Not sure this is the right channel. What provider and kind of resource contains this function?
a

acceptable-army-69872

03/09/2021, 8:44 PM
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

bland-byte-34481

03/09/2021, 9:01 PM
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

little-cartoon-10569

03/09/2021, 9:14 PM
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

bland-byte-34481

03/09/2021, 9:18 PM
thank you! i'll pass the repository