nice-father-44210
03/17/2022, 6:42 PMComponentResources
that encode our best practices while allowing the calling code to override some aspects of the underlying AWS resources.
We want to expose the available overrides as Pulumi’s Args
objects. E.g.,:
class SecureS3Bucket(pulumi.ComponentResource):
def __init__(
self,
name: str,
bucket_overrides: aws.s3.BucketArgs = aws.s3.BucketArgs(),
Is there a convenient way to manipulate/merge BucketArgs
objects? E.g., we might overlay required attribute values on top of the supplied bucket_overrides
argument before passing the merged object into the Bucket(BucketArgs)
constructor.
One way we’ve found is using a combination of pulumi._types.input_type_to_dict(bucket_overrides)
to turn BucketArgs
into a dict
and pulumi.set( args_object, "attribute", "value" )
to apply dict
entries to a BucketArgs
object.great-sunset-355
03/18/2022, 10:47 AMkind-jelly-61624
06/08/2022, 10:44 PMnice-father-44210
06/08/2022, 11:15 PMschema.json
.
But.. please do let me know if you solve it! I don’t know how much longer we’ll be able to get away with the mono repo approach 🙂kind-jelly-61624
06/08/2022, 11:16 PM