Hi there - I’m really trying to wrap my head aroun...
# python
a
Hi there - I’m really trying to wrap my head around the 
props
 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:
Copy code
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?
g
I think there is actually an error in Docs. Afaik resource
__init__
can take
args
or arguments directly
Copy code
def __init__(__self__,
                 resource_name: str,
                 args: Optional[ZoneArgs] = None,
                 opts: Optional[pulumi.ResourceOptions] = None):
args
is later in the code assigned to
__props__
I have a feeling that
props
argument name came from JS/TS in this case and therefore is a typo in docs. As for the usage of props, here is an example.
Copy code
# with props
route53.Zone(
    args=route53.ZoneArgs(name="<http://example.com|example.com>")
)
# without props
route53.Zone(name="<http://example.com|example.com>")
@billowy-army-68599 Could you please verify the correctness of my statement, we could then fix the docs together. Thank you!
b
i'm not actually sure myself, could you open an issue in pulumi/docs and I'll have someone verify it @great-sunset-355
👀 1
g
@billowy-army-68599 there you go: https://github.com/pulumi/pulumi-hugo/issues/684
r