Report this

What is the reason for this report?

App platform terraform Gitlab user cannot access repo

Posted on July 16, 2021

Hello!

I work on setting up App platforms static-site instances through the Terraform provider. I use a service account user in GitLab to provide access to the repo to DigitalOcean application (it’s just a regular user account but not tied to a real person hence it doesn’t have any SSH keys). This user is then given access on a per repo basis. I gave it a maintainer access and while connected as that user I authorized the DigitalOcean GitLab app.

When running terraform apply I get an error:

Error: Error creating App: POST https://api.digitalocean.com/v2/apps: 400 GitLab user does not have access to <repo>

Everything seems to be connected properly because I can create an APP through the DO back-office and it properly deploys. I can access the static-site afterwards with no problem.

Does DO clone the repo using SSH and not HTTPS? Am I missing something here? Is there a reason why it works from the back-office but not from Terraform?

Thanks for your help.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.