Trying to create a conditional resource based on a value that is unknown during planning, for example resource IDs which are unknown until the resource is created, will cause Terraform to throw an error.
There has been no activity on this issue for 60 days. stale label will be added. If no additional activity occurs, the issue will be closed in 14 days.
Trying to create a conditional resource based on a value that is unknown during planning, for example resource IDs which are unknown until the resource is created, will cause Terraform to throw an error.
This is not true for dynamic blocks.
Examples: