Provider endpoint


I’m trying to write custom provider and have question about it is really configure provider endpoint by resource object?

For example we have API endpoint, and when created some resource by terraform, I need do some task on the API endpoint over ssh.

It is possible to do something like remote-exec but for provider endpoint?
For example I need something like this

resource "null_resource" "ds" {
  triggers = {
    datastore_identifier = join(",", test_data_store.ds.*.indentifier)

  connection {
    host = provider.public_ip

  provisioner "remote-exec" {
    inline = [
      ## Login into CP over SSH and run some commands