If you arrange for a resource to be created automatically like this, then the only thing you can do is wait for it to be created then search for it. Which means either you're working in an apply(), or you're using automation-api. Neither sounds ideal: creating resources in an apply() makes preview differ from up, and using automation-api just to work around an implementation detail is not to be recommended.