Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
App platform terraform Gitlab user cannot access repo
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.
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.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×