able-doctor-68496
10/04/2021, 3:12 PMprops
argument to the ComponentResource
constructor: https://www.pulumi.com/docs/reference/pkg/python/pulumi/#the-pulumi-python-resource-model-1
My main questions about it are:
• When would I want to pass something to this props
argument?
• What would I pass to that argument?
For example, currently I’m passing a Kubernetes namespace to a “parent” ComponentResource
that I’ve created. I’m passing it like so:
def __init__(..., namespace: Namespace, ...):
super().__init__(
...,
props={'namespace': namespace},
...
)
Is that the correct way to use props
? My thinking was that this would let the Pulumi “engine” know that there is an ordering requirement between the namespace and my ComponentResource
. Is that how it works? If not, then what are props
for?