Yes, the code inside the apply is executed during ...
# python
g
Yes, the code inside the apply is executed during the deployment, when that information (the id) is guaranteed to be available The code outside is executed before the deployment, it is the code that define the graph of resources. When that code is running, the id is not known, only the reference to its future value (the Output object) is available.