The azureSubscription
field in the Azure DevOps pipeline YAML refers to the name or ID of the Azure service connection that you set up in Azure DevOps to authenticate and authorize the pipeline to interact with your Azure resources (e.g., your AKS cluster).
In Azure DevOps, this service connection represents the credentials (usually based on a Service Principal) that the pipeline will use to perform tasks such as deploying to AKS, accessing other Azure resources, etc.
Steps to find or create the azureSubscription
value:
- Go to Azure DevOps:
- Navigate to your Azure DevOps project.
- Project Settings:
- In the lower-left corner, click on Project settings.
- Service connections:
- Under Pipelines, click on Service connections.
- You should see a list of service connections if any are already set up. These represent the available Azure subscriptions that your pipeline can use.
- Find the correct service connection:
- The
azureSubscription
value should match the name of the service connection listed here. For example, it might be something likeMyAzureServiceConnection
, or in your case, the name of the subscription you’re authorized to use.
- The
- Create a new service connection (if necessary):
- If you don’t have a service connection set up, click New service connection.
- Choose Azure Resource Manager and follow the steps to create a new connection using either:
- Service Principal (automatic) (recommended) – this will automatically set up a Service Principal and permissions for you.
- Service Principal (manual) – this allows you to manually enter details such as Subscription ID, Service Principal ID, and Secret if you’ve set up credentials manually in Azure.
- After setting it up, you can use the name of this service connection in your pipeline YAML.
- Use in the pipeline:
Latest posts by Rajesh Kumar (see all)
- What is DevContainer? - December 20, 2024
- Top 10 Website Development Companies in Vadodara - December 20, 2024
- Compare SAST, DAST and RASP & its Tools for DevSecOps - December 19, 2024