Skip to content

Reference Implementation about Policy as Code applied to Azure based on DevSecOps Practices

Notifications You must be signed in to change notification settings

oaviles/hello_policy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 

Repository files navigation

DevSquad Accelerator: Policy as Code

Implement Azure Policy as Code with GitHub

Azure Policy Pillars

Reference: Tutorial

Create service principal with a secret, follow the steps to configure Azure Service Principal with a secret.

  • Define a new secret under your repository settings, Add secret menu
  • Store the output of the below az cli command as the value of secret variable, for example 'AZURE_CREDENTIALS'
 az ad sp create-for-rbac --name "AzureArc" --role contributor \
                           --scopes /subscriptions/{subscription-id}/resourceGroups/{resource-group} \
                           --sdk-auth
                           
 # Replace {subscription-id}, {resource-group} with the subscription, resource group details
 # The command should output a JSON object similar to this:

 {
   "clientId": "<GUID>",
   "clientSecret": "<STRING>",
   "subscriptionId": "<GUID>",
   "tenantId": "<GUID>",
   "resourceManagerEndpointUrl": "<URL>"
   (...)
 }

Resources:

About

Reference Implementation about Policy as Code applied to Azure based on DevSecOps Practices

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages