Building codes and what is required where you live varies greatly.
Here in Jackson County Ohio USA where my farm is and where I live when was about to start the building of my dream home here on my farm in August of 2019. I went to the county planning commissioner's office to figure out what the building codes were that I had to follow and what building permits I needed to file for. The clerk looked up my address and said you do not have any building codes where your property is located and there is no building permits required either. Coming to the country from a city I was shocked where you need a permit just to shit is a public bathroom I was shocked. The clerk said wait the electric company has a requirement about where they set the telephone pole and transformer and meter for your new home build though, and that the county has to approve your septic system before I can occupy the new home. I quipped I already live there in the old farmhouse and will use the same telephone pole and transformer but will have to contact them about a new meter, and that the septic system was totally new and replaced in August of 2018, so I am good to go/start. The clerk looked at me and quipped, "Yes power and sewer" and I smiled and quipped back, "Ah it is so nice that all you guys' care about is my electrical and my septic!" "I never had a government agency care so much about where I get my charge from, and where my shit goes before". The clerk got red faced and smiled saying have a nice day.