Hi
If you want to automate Packaging a training application using Terraform you will use the described way in the doc [1] in your terraform script you can create a service account with all the right permission to be used by Terraform.
It seems to me you question is more related to the use of terraform you better post you question in the Terraform community support[2]
[1]:https://cloud.google.com/ai-platform/training/docs/packaging-trainer
[2]: https://discuss.hashicorp.com/c/terraform-core/27