https://pulumi.com logo
Title
m

microscopic-dress-1605

06/02/2021, 5:01 PM
Can anyone explain what is the purpose of the
args: Inputs
argument of the
ComponentResource
constructor? From the docs it is not really clear.
new ComponentResource(type: string, name: string, args: Inputs, opts: ComponentResourceOptions, remote: boolean)
args
Information passed to [initialize] method.
When should we pass a value to
args
that is not the empty object?
r

red-match-15116

06/02/2021, 5:50 PM
You would do this when you want your component to behave differently based on different inputs. For example, the ECS Task Definition Component in awsx accepts TaskDefinitionArgs which are then passed through to the child resources it contains
m

microscopic-dress-1605

06/02/2021, 6:01 PM
Alright. Ok. Thank you @red-match-15116 ๐Ÿ™
๐Ÿ‘๐Ÿฝ 1
๐Ÿ˜›artypus-8bit: 1