sparse-intern-71089
12/02/2021, 2:37 AMcolossal-boots-62227
12/02/2021, 3:15 AMcolossal-boots-62227
12/02/2021, 3:15 AMcolossal-boots-62227
12/02/2021, 3:18 AMapply the domain_validation_options and create an Route53 Record for each (if anyone knows a way around this I’m all ears!)red-match-15116
12/02/2021, 4:04 AMpreview (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
list_of_things: Output[List]
for i in range(3):
resource = MyResource("my-resource", property=list_of_things.apply(lambda args: args[i])
Note: I am no longer an "official" Pulumi folk but I was until pretty recently.nice-father-44210
12/08/2021, 10:43 PMlambda will be invoked asynchronously and the value of i at that time will always be 2nice-father-44210
12/08/2021, 10:44 PMlambda args, i = i: args[i]red-match-15116
12/08/2021, 10:50 PMnice-father-44210
12/09/2021, 5:03 PM