pulumi/sdk/python/lib
Zaid Ajaj 05d789752b
[sdk] Implement deferred output for nodejs and python (#17793)
### Description

Addressing https://github.com/pulumi/pulumi/issues/17787

This PR implements the _deferred output_ construct for both the NodeJS
and python SDKs so that they can be used for generating programs from
terraform code that have circular references in component resources
(i.e. https://github.com/pulumi/pulumi/issues/13581)

I thought using a function that returns a tuple instead of a class makes
for a simpler implementation for both SDKs

API for nodejs:
```ts
const [bucketArn, resolveBucketArn] = pulumi.deferredOutput<string>();
const bucket = new aws.s3.Bucket("example", { });
resolveBucketArn(bucket.arn);
```
API for python:
```python
bucket_arn, resolve = pulumi.deferred_output()
bucket = aws.s3.Bucket("example")
resolve(bucket.arn)
```
2024-11-21 15:25:49 +00:00
..
pulumi [sdk] Implement deferred output for nodejs and python (#17793) 2024-11-21 15:25:49 +00:00
test [sdk] Implement deferred output for nodejs and python (#17793) 2024-11-21 15:25:49 +00:00
test_types Fix Pyright type checking of "StackReference#outputs" (#16957) 2024-08-14 05:14:23 +00:00
test_with_mocks [sdk/{nodejs,python}] Fix errors when testing remote components with mocks (#8053) 2021-09-24 06:08:13 -07:00
setup.py Freeze version 3.140.0 (#17806) 2024-11-19 13:57:39 +00:00