Hoe to validate ARM template by passing credential

2019-07-29 23:35发布

问题:

My ARM template is running fine. I need to authenticate my ARM template by passing credentials. When I have gone through logs I can see below entries

[debug]00000-000000-00000-00000-000000000 auth param serviceprincipalid = ******** [debug]00000-000000-00000-00000-000000000 auth param serviceprincipalkey = ********

What is this Service Principal Id and Service Principal Key? I am not passing these values in ARM template. I am trying to figure out where these values are fetched and what is these values as values are encrypted.

Can we explicitly pass these values and validate ARM template.

回答1:

The service principal id comes from applications held within your Azure Active Directory this documentation from Octopus Deploy is good at giving you a simple overview of how to create one of these.

Also, note the section at the bottom of that article which shows you how to set this permissions. This bit is really important as your Service Principal needs access to your Azure subscription to CRUD resources.

As for utilising the service principal that depends on which CI/CD platform you are using. Essentially the step which deploys the arm template needs run as the service principal. Most platforms will have a documented way of connecting to Azure

Hope that helps.