generated from Azure/terraform-azurerm-avm-template
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Charles J Shea <[email protected]>
- Loading branch information
1 parent
47ad5d9
commit a939cc3
Showing
9 changed files
with
77 additions
and
7 deletions.
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
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
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
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
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 |
---|---|---|
@@ -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 |
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
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,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" |
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,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 |
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