Use `only_if` to restrict resource execution