Skip to content

Commit

Permalink
fix: grept apply (#4)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Charles J Shea <[email protected]>
  • Loading branch information
3 people authored Jan 25, 2024
1 parent 47ad5d9 commit a939cc3
Show file tree
Hide file tree
Showing 9 changed files with 77 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

testexamples:
if: github.event.repository.name != 'terraform-azurerm-avm-template'
runs-on: [ self-hosted, 1ES.Pool= ]
runs-on: [ self-hosted, 1ES.Pool=terraform-azurerm-avm-res-network-firewall ]
needs: getexamples
environment: test
env:
Expand All @@ -37,6 +37,7 @@ jobs:
matrix:
example: ${{ fromJson(needs.getexamples.outputs.examples) }}
max-parallel: 5
fail-fast: false
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1

Expand Down
24 changes: 22 additions & 2 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ concurrency:
cancel-in-progress: true

jobs:
linting:
docs:
if: github.event.repository.name != 'terraform-azurerm-avm-template'
name: linting
name: docs

runs-on: ubuntu-latest
steps:
- name: checkout repository
Expand All @@ -26,7 +27,26 @@ jobs:
- name: check docs
uses: Azure/terraform-azurerm-avm-template/.github/actions/docs-check@main

terraform:
if: github.event.repository.name != 'terraform-azurerm-avm-template'
name: terraform
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1

- name: lint terraform
uses: Azure/terraform-azurerm-avm-template/.github/actions/linting@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

avmfix:
if: github.event.repository.name != 'terraform-azurerm-avm-template' && false
name: avmfix
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1

- name: avmfix
uses: Azure/terraform-azurerm-avm-template/.github/actions/avmfix@main
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ override.tf.json
.terraformrc
terraform.rc
*tfplan*
.terraform.lock.hcl
README-generated.md
avm.tflint.hcl
avm.tflint.merged.hcl
avm.tflint_example.hcl
avm.tflint_example.merged.hcl
avmmakefile
2 changes: 1 addition & 1 deletion .terraform-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

formatter: "markdown document" # this is required

version: "0.16.0"
version: "~> 0.17.0"

header-from: "_header.md"
footer-from: "_footer.md"
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
SHELL := /bin/bash

$(shell curl -H 'Cache-Control: no-cache, no-store' -sSL "https://raw.githubusercontent.com/Azure/tfmod-scaffold/main/avmmakefile" -o avmmakefile)

$(shell curl -H 'Cache-Control: no-cache, no-store' -sSL "https://raw.githubusercontent.com/Azure/tfmod-scaffold/main/avmmakefile" -o avmmakefile)

-include avmmakefile
2 changes: 1 addition & 1 deletion SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

This project uses GitHub Issues to track bugs and feature requests. Please search the existing issues before filing new issues to avoid duplicates. For new issues, file your bug or feature request as a new issue.

Issues can be created and searched through for existing [issues here](https://github.com//issues).
Issues can be created and searched through for existing [issues here](https://github.com/Azure/terraform-azurerm-avm-res-network-firewall/issues).

Please provide as much information as possible when filing an issue. Include screenshots or correlation IDs if possible (please redact any sensitive information).

Expand Down
21 changes: 21 additions & 0 deletions avm
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env sh

usage () {
echo "Usage: avm <make target>"
}

CONTAINER_RUNTIME=${CONTAINER_RUNTIME:-docker}

if [ ! "$(command -v "$CONTAINER_RUNTIME")" ]; then
echo "Error: $CONTAINER_RUNTIME is not installed. Please install $CONTAINER_RUNTIME first."
exit 1
fi

if [ -z "$1" ]; then
echo "Error: Please provide a make target. See https://github.com/Azure/tfmod-scaffold/blob/main/avmmakefile for available targets."
echo
usage
exit 1
fi

$CONTAINER_RUNTIME run --pull always --rm -v "$(pwd)":/src -w /src mcr.microsoft.com/azterraform make "$1"
23 changes: 23 additions & 0 deletions avm.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@echo off
SETLOCAL

REM Set CONTAINER_RUNTIME to its current value if it's already set, or docker if it's not
IF DEFINED CONTAINER_RUNTIME (SET "CONTAINER_RUNTIME=%CONTAINER_RUNTIME%") ELSE (SET "CONTAINER_RUNTIME=docker")

REM Check if CONTAINER_RUNTIME is installed
WHERE /Q %CONTAINER_RUNTIME%
IF ERRORLEVEL 1 (
echo Error: %CONTAINER_RUNTIME% is not installed. Please install %CONTAINER_RUNTIME% first.
exit /b
)

REM Check if a make target is provided
IF "%~1"=="" (
echo Error: Please provide a make target. See https://github.com/Azure/tfmod-scaffold/blob/main/avmmakefile for available targets.
exit /b
)

REM Run the make target with CONTAINER_RUNTIME
%CONTAINER_RUNTIME% run --pull always --rm -v "%cd%":/src -w /src mcr.microsoft.com/azterraform make %1

ENDLOCAL
2 changes: 1 addition & 1 deletion examples/.terraform-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

formatter: "markdown document" # this is required

version: "0.16.0"
version: "~> 0.17.0"

header-from: "_header.md"
footer-from: "_footer.md"
Expand Down

0 comments on commit a939cc3

Please sign in to comment.