It's a complex dynamic in cricket and best not to pigeon-hole yourself or to think too much about it at all. All bowlers gamble in varying amounts, but while risks are usually distinct and measurable, the payouts vary in their proportion.
What we call a 'good' line and length is one for which a safe scoring shot is not apparent . So in that sense it is defensive. However, a good length ball, combined with appropriate line, should often hit the top of the stumps. The good length is thus one that forces the batsman to play and brings all modes of dismissal into possibility. In that sense, it is attacking.
So it's the same with flight and everything. If you know how to stop the batsman from scoring, it's not much different from knowing what will make the batsman think just a little bit about taking a risk. Control over pace and flight are just skills. It is the the intentions of the batsman and bowler that cause for notions of attack or defence. If you're one of the two, then you can define that at will.