How to attach a bitbucket token to a service principal

Wallinson Lima 0 Reputation points
2024-02-13T18:43:12.37+00:00

I am having a little trouble using a service principle to deploy an app function via IAC a using BitBucket as repo. I can't set the BitBucket repo token for the service principal because Azure only allows that to happen over the Azure Portal Interface (which is not accessible for service principals), and it seems that is not possible to be done via CLI. It is a requirement to use a service principal for this, also having to log in via portal to enable this token kills the purpose of infrastructure as code.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,960 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ajkuma 28,036 Reputation points Microsoft Employee Moderator
    2024-02-14T08:26:07.71+00:00

    @Wallinson Lima, To better assist you on this, just to clarify, have you provisioned the app/site on Azure App Service Web App? Could you please share more details about your requirement?

    Just to highlight, see if [Repository Access Tokens in Bitbucket] (https://support.atlassian.com/bitbucket-cloud/docs/using-access-tokens/) works for your requirement. These tokens are connected to a repository, not a user, and can be used for scripting, CI/CD tools, and testing BitBucket-connected apps during development. You may leverage these tokens with the Git command line interface (Git CLI) in non-interactive programs and scripts such as build tools, automation scripts, and CI/CD applications

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.