The magic module resource definitions for Azure.
Перейти к файлу
Houk 617f89be50 Add a tutorial document for the pipeline. (#127) 2019-10-14 12:58:49 +08:00
docs Add a tutorial document for the pipeline. (#127) 2019-10-14 12:58:49 +08:00
specs Introduce Batch Application resource (#66) 2019-09-05 16:50:33 -04:00
tools Introduce WebApplicationFirewallPolicy resource (#102) 2019-09-05 16:46:26 -04:00
.gitignore Add Makefile and refactored Azure pipeline (#58) 2019-07-01 13:10:24 -07:00
.gitmodules Add Makefile and refactored Azure pipeline (#58) 2019-07-01 13:10:24 -07:00
LICENSE Initial commit 2019-05-20 18:32:40 -07:00
Makefile autogenerated-apimanagementapidiagnostic (#87) 2019-08-06 17:25:28 +08:00
README.md Update README.md 2019-07-24 13:00:58 -07:00
azure-pipelines.yml autogenerated-apimanagementapidiagnostic (#87) 2019-08-06 17:25:28 +08:00
list_resources.sh add *.yaml files checking in script (#99) 2019-08-07 01:03:47 -04:00

README.md

Magic-Module Specifications for Azure

Overview

This repository is where we put all magic-module specifications for Azure resources. Magic-module is an open source utility developed by Google to autogenerate support code in a variety of open source DevOps tools.

For Azure resources, we chose to generate Terraform and Ansible code by magic-module. So we extended magic-module to support both Azure resources and GCP resources side-by-side. Please make sure you are using the Azure-extended magic-module instead of the original one when generating code from the specifications in this repository.

Folder Structure

The following figure illustrates the overall folder structure of this repository:

magic-module-specs
  |- specs
  |   |- <resource folder 1>
  |   |    |- api.yaml
  |   |    |- ansible.yaml
  |   |    |- terraform.yaml
  |   |    |- <custom code 1>.erb
  |   |    |- <custom code 2>.erb
  |   |    |- ...
  |   |    |- examples
  |   |         |- ansible
  |   |         |    |- <example 1>.yaml
  |   |         |    |- <example 2>.yaml
  |   |         |    |- ...
  |   |         |- terraform
  |   |              |- <example 1>.yaml
  |   |              |- <example 2>.yaml
  |   |              |- ...
  |   |- <resource folder 2>
  |   |- ...
  |- generated
      |- ansible
      |    |- **
      |- go
        |- src
          |- github.com
            |- terraform-providers
              |- terraform-provider-azurerm
                  |- **

The repository contains specifications for Azure resources supported in open source DevOps tools. Each resource specifications should be put in an isolated folder under the specs folder of root (i.e. <resource folder i>). For example, /batchaccount folder contains all specifications related to Azure batch account.

Specifications of a resource consist of the following items:

  • An api.yaml defining Azure SDK structure as well as the standard user interface of the DevOps tools
  • An ansible.yaml defining Ansible specific override to the api.yaml
  • A terraform.yaml defining Terraform specific overrides to the api.yaml
  • Zero or more .erb files defining special code to be embedded in the generated code
  • Zero or more .yaml files under examples folder defining examples and test cases

For a detailed description of the items mentioned above, please refer to RESOURCE_SPEC.

This repository also includes all generated code in generated. The folder strcture within these generated folders exactly matches the ansible and terraform provider for Azure respectively.

Please refer to the Workflow section about how to make contributions to DevOps tools using the generated code.

Workflow

Expert: jcline@microsoft.com.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

License

Copyright (c) Microsoft Corporation. All rights reserved.

Licensed under the MIT license.