any idea why my nesting is off? I’m expecting the ...
# general
b
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
this sometimes happens when you scroll up.
did you scoll up?
b
not sure what you mean
c
In the terminal.
Did you scroll up?
b
oh, i think i know what you mean. It isn’t that
w
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
yeah, I guess this is where TS shines. thanks for the help