You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creating pretty much any resource can result in the creation of at least one additional associated resource (at minimum a new resource group). It would be useful to return a list of all the implicitly created resources when a given resource is called so that user code can easily identify them and possibly delete them later as part of cleanup, if they do not want to rely on resource groups for that purpose for one reason or another.
Now, because of Azure's createOrUpdate semantics, and the lack of a truly atomic "createIfNotAlreadyExists" operation in Azure, we cannot return a list of resources that were truly created -- Azure does not give us that info. It is possible that some of the resources we think we are creating already exist - we can't reliably tell the difference today.
But perhaps it is enough for such scenarios if the SDK APIs simply return the list of all the resources that were intended to be created (and are now in existence). We could do at least that much rather easily, via perhaps a create(List<Resource> resourcesCreated) -- we could populate the resourcesCreated list provided by the user code with what we already track internally as created resources in the graph impl.
The text was updated successfully, but these errors were encountered:
jianghaolu
changed the title
How can we return a list of all the created dpeendency resources?
How can we return a list of all the created dependency resources?
Jul 5, 2016
do we have any way to get list of created resources of a deployment? This will be helpful to delete specific deployments from a resource group or roll back a specific deployment in case of failure.
Creating pretty much any resource can result in the creation of at least one additional associated resource (at minimum a new resource group). It would be useful to return a list of all the implicitly created resources when a given resource is called so that user code can easily identify them and possibly delete them later as part of cleanup, if they do not want to rely on resource groups for that purpose for one reason or another.
Now, because of Azure's createOrUpdate semantics, and the lack of a truly atomic "createIfNotAlreadyExists" operation in Azure, we cannot return a list of resources that were truly created -- Azure does not give us that info. It is possible that some of the resources we think we are creating already exist - we can't reliably tell the difference today.
But perhaps it is enough for such scenarios if the SDK APIs simply return the list of all the resources that were intended to be created (and are now in existence). We could do at least that much rather easily, via perhaps a
create(List<Resource> resourcesCreated)
-- we could populate the resourcesCreated list provided by the user code with what we already track internally as created resources in the graph impl.The text was updated successfully, but these errors were encountered: