Unable to run the apply command after changing the backend

i am using terraform 0.12 version. I have a root module with main.tf,variable.tf which was working fine earlier.

recently we moved our state file from local to the terraform cloud as backend. we can login to terraform cloud and can see the states/run etc on the web console.

the issue is that the same config .tf file now throws an error stating that “OpenStack connection error, retries exhausted. Aborting. Last error was: dial tcp: lookup openstack.test.com on no such host”

after changing the state file from local to remote do we need to make changes to the TF file?