-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix test * add workflows * terraform-docs: automated action --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
d4bc6ef
commit 2517092
Showing
3 changed files
with
133 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
name: Module:fabric-capacity | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- '.github/workflows/fabric-capacity.yml' | ||
- 'terraform/fabric/fabric-capacity/**' | ||
# - '.github/actions/**' | ||
|
||
env: | ||
terraform_workingdir: "terraform/fabric/fabric-capacity" | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
jobs: | ||
terraform-lint: | ||
name: Run Terraform lint | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: "${{ env.terraform_workingdir }}" | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: hashicorp/setup-terraform@v2 | ||
|
||
- name: Terraform fmt | ||
id: fmt | ||
run: terraform fmt -check | ||
continue-on-error: false | ||
|
||
terraform-sec: | ||
name: Run Terraform tfsec | ||
needs: | ||
- terraform-lint | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@main | ||
|
||
- name: Run tfsec with reviewdog output on the PR | ||
uses: ./.github/actions/run-terraform-sec | ||
|
||
terratest: | ||
name: Run Terratest | ||
needs: | ||
- terraform-sec | ||
runs-on: [self-hosted, 1ES.Pool=azure-data-labs-modules] | ||
environment: | ||
name: acctests | ||
|
||
defaults: | ||
run: | ||
working-directory: "${{ env.terraform_workingdir }}/test" | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
|
||
# - name: Set up Go | ||
# uses: actions/setup-go@v2 | ||
# with: | ||
# go-version: 1.18.2 | ||
# | ||
# - name: Setup Dependencies | ||
# run: | | ||
# az login --identity > /dev/null | ||
# export ARM_USE_MSI=true | ||
# export ARM_SUBSCRIPTION_ID=$(az login --identity | jq -r '.[0] | .id') | ||
# export ARM_TENANT_ID=$(az login --identity | jq -r '.[0] | .tenantId') | ||
# go mod init test && go mod tidy | ||
# env: | ||
# GOPATH: "/home/cloudtest/work/azure-labs-modules/azure-labs-modules/${{ env.terraform_workingdir }}" | ||
# | ||
# - name: Unit-test | ||
# run: | | ||
# az login --identity > /dev/null | ||
# export ARM_USE_MSI=true | ||
# export ARM_SUBSCRIPTION_ID=$(az login --identity | jq -r '.[0] | .id') | ||
# export ARM_TENANT_ID=$(az login --identity | jq -r '.[0] | .tenantId') | ||
# go test -v -timeout 45m | ||
# env: | ||
# GOPATH: "/home/cloudtest/work/azure-labs-modules/azure-labs-modules/${{ env.terraform_workingdir }}" | ||
|
||
terraform-docs: | ||
name: Run Terraform Docs | ||
needs: | ||
- terratest | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Render terraform docs and push changes back to PR | ||
uses: ./.github/actions/run-terraform-docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!-- BEGIN_TF_DOCS --> | ||
## Resources | ||
|
||
| Name | Type | | ||
|------|------| | ||
| [azapi_resource.fab_capacity](https://registry.terraform.io/providers/Azure/azapi/latest/docs/resources/resource) | resource | | ||
|
||
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
|------|-------------|------|---------|:--------:| | ||
| <a name="input_basename"></a> [basename](#input\_basename) | Basename of the module. | `string` | n/a | yes | | ||
| <a name="input_resource_group_id"></a> [resource\_group\_id](#input\_resource\_group\_id) | Resource group id. | `string` | n/a | yes | | ||
| <a name="input_location"></a> [location](#input\_location) | Location of the resource group. | `string` | n/a | yes | | ||
| <a name="input_tags"></a> [tags](#input\_tags) | A mapping of tags which should be assigned to the deployed resource. | `map(string)` | `{}` | no | | ||
| <a name="input_module_enabled"></a> [module\_enabled](#input\_module\_enabled) | Variable to enable or disable the module. | `bool` | `true` | no | | ||
| <a name="input_sku"></a> [sku](#input\_sku) | SKU name | `string` | `"F2"` | no | | ||
| <a name="input_admin_email"></a> [admin\_email](#input\_admin\_email) | Fabric administrator email | `string` | n/a | yes | | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| <a name="output_id"></a> [id](#output\_id) | Resource identifier of the instance of Fabric Capacity. | | ||
<!-- END_TF_DOCS --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters