https://github.com/Azure/terraform-verified-module
A template for verified Terraform module.
https://github.com/Azure/terraform-verified-module
Last synced: 5 months ago
JSON representation
A template for verified Terraform module.
- Host: GitHub
- URL: https://github.com/Azure/terraform-verified-module
- Owner: Azure
- License: mit
- Created: 2022-09-23T08:33:28.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-22T02:58:09.000Z (about 1 year ago)
- Last Synced: 2024-10-29T19:39:50.853Z (6 months ago)
- Language: Go
- Homepage:
- Size: 89.8 KB
- Stars: 8
- Watchers: 4
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
- jimsghstars - Azure/terraform-verified-module - A template for verified Terraform module. (Go)
README
# Microsoft Verified Terraform Module
The Verified Terraform module is a template repository to help developers create their own Terraform Module.
As we've used Microsoft 1ES Runners Pool as our acceptance test runner, **only Microsoft members could use this template for now**.
Enjoy it by following steps:
1. Use [this template](https://github.com/Azure/terraform-verified-module) to create your repository.
2. Read [Onboard 1ES hosted Github Runners Pool through Azure Portal](https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-github-runners/createpoolportal), install [1ES Resource Management](https://github.com/apps/1es-resource-management) on your repo.
3. Add a Github [Environment](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment) named **acctests** in your repo, setup [**Required Reviewers**](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#required-reviewers).
4. Update [`acc-test.yaml`](.github/workflows/acc-test.yaml), modify `runs-on: [self-hosted, 1ES.Pool=]` with your 1es runners' pool name (basically it's your repo's name).
5. Write Terraform code in a new branch.
6. Run `docker run --rm -v ${pwd}:/src -w /src mcr.microsoft.com/azterraform:latest make pre-commit` to format the code.
7. Run `docker run --rm -v $(pwd):/src -w /src mcr.microsoft.com/azterraform:latest make pr-check` to run the check in local.
8. Create a pull request for the main branch.
* CI pr-check will be executed automatically.
* Once pr-check was passed, with manually approval, the e2e test and version upgrade test would be executed.
9. Merge pull request.
10. Enjoy it!## Requirements
| Name | Version |
|---------------------------------------------------------------------------|---------|
| [terraform](#requirement\_terraform) | >= 1.1 |
| [null](#requirement\_null) | >= 3.1 |## Providers
| Name | Version |
|------------------------------------------------------|---------|
| [null](#provider\_null) | >= 3.1 |## Modules
No modules.
## Resources
| Name | Type |
|------------------------------------------------------------------------------------------------------------|----------|
| [null_resource.nop](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |## Inputs
| Name | Description | Type | Default | Required |
|-----------------------------------------------------------------|------------------|----------|---------|:--------:|
| [echo\_text](#input\_echo\_text) | The text to echo | `string` | n/a | yes |## Outputs
| Name | Description |
|-------------------------------------------------------------------|------------------|
| [echo\_text](#output\_echo\_text) | The text to echo |