Archive_file flat

I am using archive_file to help deploy a cloud function v2 in GCP.

data "archive_file" "steampipe" {
  type        = "zip"
  source_dir  = "${path.module}/config/steampipe-import/cloudfunction/"
  output_path = "${path.module}/config/steampipe-import/code.zip"
}

When the deployment is through the resulting container shows an unpacked tree:

/workspace/cloudfunction/main.py
/workspace/cloudfunction/requirements.txt
/workspace/cloudfunction/templates/
/workspace/cloudfunction/templates/notification.html.j2
/workspace/cloudfunction/templates/notification.text.j2

When I manually pack my code.zip with:

# cd  ./config/steampipe-import/cloudfunction/
# zip code.zip * templates/*
updating: main.py (deflated 73%)
updating: requirements.txt (deflated 34%)
updating: templates/ (stored 0%)
  adding: templates/notification.html.j2 (deflated 34%)
  adding: templates/notification.text.j2 (deflated 23%)

this results in a tree:

/workspace/main.py
/workspace/requirements.txt
/workspace/templates/
/workspace/templates/notification.html.j2
/workspace/templates/notification.text.j2

This tree results in a working cloud function, while the cloud function packed with the terraform provider results in requirements not being installed.

Does anyone know how to create a .zip with a flatter structure? As far as I understand there is no option to set a CWD for this action.