Indonesia is expected to approve a law this month banning pre-marital sex as well as living together prior to marriage. While Bali is generally more liberal than the rest of the country, the law would apply nationwide, including for tourists.
And while homosexuality is not illegal in Indonesia per se (except in the Aceh province) same sex marriage is not legal. As a result same sex partners living together would become criminalized, under a statute that includes penalties of up to a year in prison.