https://pulumi.com logo
b

busy-umbrella-36067

10/03/2018, 7:35 PM
any idea why my nesting is off? I’m expecting the ecr repos to be children of
standard:Build
Copy code
class Build extends pulumi.ComponentResource {
  constructor(name, opts) {
    super("standard:Build", name, {}, opts)

    let repository = new getEcrRepository(name, this)
    let ecrRepoPolicy = repository.repositoryPolicy
    let ecrLifecyclePolicy = repository.lifecyclePolicy
  }
}

getEcrRepository = function(name, parent) {
  repository = new aws.ecr.Repository(name, { parent: parent })
...
c

creamy-potato-29402

10/03/2018, 7:35 PM
this sometimes happens when you scroll up.
did you scoll up?
b

busy-umbrella-36067

10/03/2018, 7:36 PM
not sure what you mean
c

creamy-potato-29402

10/03/2018, 7:37 PM
In the terminal.
Did you scroll up?
b

busy-umbrella-36067

10/03/2018, 7:38 PM
oh, i think i know what you mean. It isn’t that
w

white-balloon-205

10/03/2018, 7:59 PM
repository = new aws.ecr.Repository(name, { parent: parent })
Looks like you are passing these args as the second parameter, but they should be the third. I think you want
, {},
in there? (If you are using TypeScript, I would expect this to trigger an error).
new getEcrRepository(name, this)
- probably unrelated - but I suspect
new
is not wanted/needed here.
b

busy-umbrella-36067

10/03/2018, 8:00 PM
yeah, I guess this is where TS shines. thanks for the help