https://pulumi.com logo
#general
Title
# general
r

red-football-97286

01/09/2020, 4:37 PM
Is there a way to pass two arguments using the
apply
method with Python?
Copy code
template = lambda Topic, Endpoint: { "AWSTemplateFormatVersion": "2010-09-09",
    "Resources": {
        "MySubscription": {
            "Type": "AWS::SNS::Subscription",
            "Properties": {
                "Protocol": "email",
                "Endpoint": Endpoint,
                "TopicArn": Topic
            },
        }
    }
}

sns_email = cloudformation.Stack(
    "Cloudformation-email",
    template_body = (template(sns_topic.arn, Endpoint))
)
g

gentle-diamond-70147

01/09/2020, 5:00 PM
Output.all(...)
will let you apply multiple arguments. https://www.pulumi.com/docs/intro/concepts/programming-model/#all