nice-father-4421012/02/2021, 2:37 AM
say the following:
'func' is not allowed to make resources.
colossal-boots-6222712/02/2021, 3:15 AM
and create an Route53
for each (if anyone knows a way around this I’m all ears!)
red-match-1511612/02/2021, 4:04 AM
(because some items in the output may not be known at preview time). If you can deal with the "may not have accurate preview" issue, then it's IMO fine to create resources within the apply. That being said, depending on if you know the length of your list or map, you can do things like
Note: I am no longer an "official"
list_of_things: Output[List] for i in range(3): resource = MyResource("my-resource", property=list_of_things.apply(lambda args: args[i])
but I was until pretty recently.
nice-father-4421012/08/2021, 10:43 PM
will be invoked asynchronously and the value of
at that time will always be
lambda args, i = i: args[i]
red-match-1511612/08/2021, 10:50 PM
nice-father-4421012/09/2021, 5:03 PM