{"id":17800282,"url":"https://github.com/azure/bicep-deploy","last_synced_at":"2025-03-17T08:37:11.454Z","repository":{"id":258852705,"uuid":"856564861","full_name":"Azure/bicep-deploy","owner":"Azure","description":"Azure Deploy GitHub Action","archived":false,"fork":false,"pushed_at":"2025-03-12T13:30:33.000Z","size":5144,"stargazers_count":29,"open_issues_count":19,"forks_count":5,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-03-16T10:11:28.399Z","etag":null,"topics":["arm-templates","azure","azure-resource-manager","bicep","deployments","github-actions"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Azure.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":"SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-12T19:44:34.000Z","updated_at":"2025-03-09T22:01:03.000Z","dependencies_parsed_at":"2025-02-19T23:21:36.146Z","dependency_job_id":"90e9cd4d-e39a-402c-a475-8949e300dce2","html_url":"https://github.com/Azure/bicep-deploy","commit_stats":null,"previous_names":["azure/deploy"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Fbicep-deploy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Fbicep-deploy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Fbicep-deploy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Fbicep-deploy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Azure","download_url":"https://codeload.github.com/Azure/bicep-deploy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244001629,"owners_count":20381805,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arm-templates","azure","azure-resource-manager","bicep","deployments","github-actions"],"created_at":"2024-10-27T12:18:31.144Z","updated_at":"2025-03-17T08:37:11.440Z","avatar_url":"https://github.com/Azure.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Azure Deployment Action\n\nThis repository offers a GitHub Action for automating the deployment and management of Azure resources using ARM Templates or Bicep files. It integrates smoothly into GitHub workflows, allowing developers to manage Azure infrastructure directly within their CI/CD pipelines.\n\nWith this action, users can:\n\n- Deploy resources via Azure Deployments or manage environments using Deployment Stacks.\n- Perform various operations like creating, validating, and previewing resource changes using the \"What If\" feature.\n\n**Key Configuration Options**\n\n- **Execution Type (`type`)**: Specifies the mode of execution, whether deploying individual resources (`deployment`) or managing full environment stacks (`deploymentStack`).\n- **Operations (`operation`)**: Users can create, validate, or preview changes before deploying resources. For deployment stacks, deletion and lifecycle management are also supported.\n- **Scope (`scope`)**: Defines the scope at which resources are deployed, such as tenant, management group, subscription, or resource group.\n- **Template \u0026 Parameters**: Paths to the ARM or Bicep templates (`template-file`) and associated parameter files (`parameters-file`).\n- **What If Analysis**: Leverage the what-if operation to preview potential changes before applying them, including options to exclude certain change types (`what-if-exclude-change-type`).\n- **Unmanaged Resource Actions**: Specify actions to take on unmanaged resources (`action-on-unmanage-resources`) or entire resource groups (`action-on-unmanage-resourcegroups`), such as deleting or detaching them.\n\nThis action simplifies Azure resource management, providing flexibility through various configurations, making it suitable for automating both simple and complex infrastructure scenarios.\n\n## Usage\n\nDeployment\n\n```yaml\n- name: Deployment\n  uses: azure/bicep-deploy@v2\n  with:\n    type: deployment\n    operation: create\n    name: Development\n    location: westus2\n    scope: subscription\n    subscription-id: 00000000-0000-0000-0000-000000000000\n    template-file: ./main.bicep\n    parameters-file: ./main.bicepparam\n```\n\nDeployment Stack\n\n```yaml\n- name: Deployment\n  uses: azure/bicep-deploy@v2\n  with:\n    type: deploymentStack\n    operation: create\n    name: Development\n    location: westus2\n    scope: subscription\n    subscription-id: 00000000-0000-0000-0000-000000000000\n    template-file: ./main.bicep\n    parameters-file: ./main.bicepparam\n    action-on-unmanage-resources: delete\n    action-on-unmanage-resourcegroups: delete\n    deny-settings-mode: denyWriteAndDelete\n```\n\nFor end-to-end workflow examples, please see [Deployment](./examples/DEPLOYMENT.md) \u0026 [Deployment Stacks](./examples/STACKS.md).\n\n## Dependencies\n\n- [Login](https://github.com/azure/login): This action is used to authenticate\n  the GitHub Actions workflow with Azure Resource Manager (ARM).\n- [Checkout](https://github.com/actions/checkout): This action checks out the\n  repository where the workflow is running onto the GitHub Actions runner.\n\n## Inputs\n\nThe inputs for this action provide flexibility and control for managing deployment operations and resources in Azure. By combining inputs like `type`, `operation`, and `scope`, workflows can be configured to handle a variety of scenarios, from deploying individual resources to managing comprehensive deployment stacks. Inputs such as template-file, parameters-file, and tags allow for easy customization of deployment configurations and metadata. Advanced features, including `actions-on-unmanaged-resources` and \"What If\" analysis, ensure deployments are predictable and secure. These options make it simple to integrate Azure resource management into CI/CD workflows.\n\n| Name                                  | Description                                                                                                   | Allowed Values                                                                                                                                   |\n| ------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |\n| `type`                                | Specifies the execution type.                                                                                 | `deployment`, `deploymentStack`                                                                                                                  |\n| `operation`                           | Specifies the operation to perform.                                                                           | deployment: `create`, `validate`, `whatIf` \u003cbr\u003e deploymentStack: `create`, `delete`, `validate`                                                  |\n| `name`                                | Specifies the name of the deployment or deploymentStack.                                                      | Free-text                                                                                                                                        |\n| `location`                            | Specifies the location of the deployment or deploymentStack.                                                  | Free-text                                                                                                                                        |\n| `scope`                               | Specifies the scope of the deployment or deploymentStack.                                                     | deployment: `tenant`, `managementGroup`, `subscription`, `resourceGroup` \u003cbr\u003e deploymentStack: `managementGroup`, `subscription`,`resourceGroup` |\n| `tenant-id`                           | Specifies the tenant ID.                                                                                      | Free-text                                                                                                                                        |\n| `management-group-id`                 | Specifies the management group ID.                                                                            | Free-text                                                                                                                                        |\n| `subscription-id`                     | Specifies the subscription ID.                                                                                | Free-text                                                                                                                                        |\n| `resource-group-name`                 | Specifies the resource group name.                                                                            | Free-text                                                                                                                                        |\n| `template-file`                       | Specifies the path to the template file.                                                                      | Free-text                                                                                                                                        |\n| `parameters-file`                     | Specifies the path to the parameters file.                                                                    | Free-text                                                                                                                                        |\n| `parameters`                          | Specifies parameters in a JSON format.                                                                        | Free-text                                                                                                                                        |\n| `what-if-exclude-change-types`        | Specifies the change types to exclude from the \"What If\" operation.                                           | Free-text                                                                                                                                        |\n| `action-on-unmanage-resources`        | Specifies the action to take on unmanaged resources.                                                          | `delete`, `detach`                                                                                                                               |\n| `action-on-unmanage-resourcegroups`   | Specifies the action to take on unmanaged resource groups.                                                    | `delete`, `detach`                                                                                                                               |\n| `action-on-unmanage-managementgroup`  | Specifies the action to take on unmanaged management groups.                                                  | `delete`, `detach`                                                                                                                               |\n| `deny-settings-mode`                  | Specifies the mode of the deny settings.                                                                      | `denyDelete`, `denyWriteAndDelete`, `none`                                                                                                       |\n| `deny-settings-excluded-actions`      | Specifies the excluded actions for the deny settings.                                                         | Free-text                                                                                                                                        |\n| `deny-settings-excluded-principals`   | Specifies the excluded principals for the deny settings.                                                      | Free-text                                                                                                                                        |\n| `deny-settings-apply-to-child-scopes` | When specified, the deny setting mode configuration also applies to the child scope of the managed resources. | `true`, `false`                                                                                                                                  |\n| `bypass-stack-out-of-sync-error`      | Specifies whether to bypass the stack out of sync error.                                                      | `true`, `false`                                                                                                                                  |\n| `description`                         | Specifies the description of the deploymentStack.                                                             | Free-text                                                                                                                                        |\n| `tags`                                | Specifies the tags for the deploymentStack.                                                                   | Free-text                                                                                                                                        |\n| `masked-outputs`                      | Specifies output names to mask values for.                                                                    | Free-text                                                                                                                                        |\n\n## Outputs\n\nThe action provides outputs from the deployment operation, which can be accessed in subsequent steps of a workflow. These outputs are useful for dynamically referencing values generated during the deployment process, such as resource IDs, endpoint URLs, or other outputs defined in Bicep templates.\n\n**Accessing Outputs**\n\nAfter the deployment step has been executed, outputs can be accessed using the outputs property of the step's ID. For example, if the deployment step's ID is `deployment`, its outputs can be accessed as `${{ steps.deployment.outputs.\u003coutputName\u003e }}`.\n\n```yaml\n- name: Print Deployment Outputs\n  run: |\n    echo \"intOutput: ${{ steps.deployment.outputs.intOutput }}\"\n    echo \"stringOutput: ${{ steps.deployment.outputs.stringOutput }}\"\n```\n\n**Defining Outputs in Bicep**\n\nOutputs are defined in the Bicep template using the output keyword. Outputs that need to be used in the workflow must be declared in the Bicep template being deployed. For example:\n\n```yaml\noutput intOutput int = 42\noutput stringOutput string = 'Hello, World!'\n```\n\nFor detailed guidance, refer to the [Bicep Outputs](https://learn.microsoft.com/azure/azure-resource-manager/bicep/outputs) documentation.\n\n**Practical Usage**\n\n1. **Define Outputs in the Bicep Template**: Declare the outputs in the `.bicep` file as shown above.\n2. **Reference Outputs in Workflow**: Use the `${{ steps.\u003cstep_id\u003e.outputs.\u003coutput_name\u003e }}` syntax in subsequent steps to access the values.\n\nThese outputs can then be leveraged for:\n\n- Debugging deployment results.\n- Passing values dynamically to other steps or jobs.\n- Integrating deployment results into a CI/CD pipeline.\n\n## Contributing\n\nThis project welcomes contributions and suggestions. Most contributions require\nyou to agree to a Contributor License Agreement (CLA) declaring that you have\nthe right to, and actually do, grant us the rights to use your contribution. For\ndetails, visit https://cla.opensource.microsoft.com.\n\nWhen you submit a pull request, a CLA bot will automatically determine whether\nyou need to provide a CLA and decorate the PR appropriately (e.g., status check,\ncomment). Simply follow the instructions provided by the bot. You will only need\nto do this once across all repos using our CLA.\n\nThis project has adopted the\n[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information see the\n[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or\ncontact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any\nadditional questions or comments.\n\n## Trademarks\n\nThis project may contain trademarks or logos for projects, products, or\nservices. Authorized use of Microsoft trademarks or logos is subject to and must\nfollow\n[Microsoft's Trademark \u0026 Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).\nUse of Microsoft trademarks or logos in modified versions of this project must\nnot cause confusion or imply Microsoft sponsorship. Any use of third-party\ntrademarks or logos are subject to those third-party's policies.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazure%2Fbicep-deploy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazure%2Fbicep-deploy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazure%2Fbicep-deploy/lists"}