As already mentioned, "It Dependes" and more importantly who are your "Users",
is it the dev/test team for whom you are creating an infrastructure -> sure.
is it the staging server/deployment server -> ofcourese.
is it end users, yes. In many cases there are scenarios like encrypitng data on transport or at encryption at rest, a ...
It depends on the organisation if you are a dedicated infrastructure specialist without any software development experience, you are unlikely to be writing feature code. However, if you are a Software Engineer who also knows Terraform, you might be called on to do both on the same day.
DevOps is not strictly a job title; in the most ...