Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
}

run-e2e-tests:
if: github.event.repository.name != 'terraform-azurerm-avm-template' && github.event.pull_request.head.repo.fork == false
if: github.event.pull_request.head.repo.fork == false
uses: Azure/terraform-azurerm-avm-template/.github/workflows/test-examples-template.yml@main
name: end to end
secrets: inherit
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2

- name: check docs
uses: Azure/terraform-azurerm-avm-template/.github/actions/docs-check@main
Expand All @@ -32,7 +32,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2

- name: lint terraform
uses: Azure/terraform-azurerm-avm-template/.github/actions/linting@main
Expand All @@ -45,7 +45,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2

- name: avmfix
uses: Azure/terraform-azurerm-avm-template/.github/actions/avmfix@main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/version-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
if: github.event.repository.name != 'terraform-azurerm-avm-template'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
- name: Check version
uses: Azure/terraform-azurerm-avm-template/.github/actions/version-check@main
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,4 @@ avm.tflint_example.merged.hcl
avmmakefile
avm.tflint_module.hcl
avm.tflint_module.merged.hcl
examples/*/policy
9 changes: 4 additions & 5 deletions avm
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,15 @@ if [ -z "$1" ]; then
exit 1
fi

# Mount .azure directory if it exists
AZURE_VOLUME=""
if [ -d "$HOME/.azure" ]; then
AZURE_VOLUME="-v $HOME/.azure:/home/runtimeuser/.azure"
# Check if AZURE_CONFIG_DIR is set, if not, set it to ~/.azure
if [ -z "$AZURE_CONFIG_DIR" ]; then
AZURE_CONFIG_DIR="$HOME/.azure"
fi

# Check if we are running in a container
# If we are then just run make directly
if [ -z "$AVM_IN_CONTAINER" ]; then
$CONTAINER_RUNTIME run --pull always --user "$(id -u):$(id -g)" --rm $AZURE_VOLUME -v "$(pwd)":/src -w /src -e GITHUB_REPOSITORY -e ARM_SUBSCRIPTION_ID -e GITHUB_REPOSITORY_OWNER mcr.microsoft.com/azterraform make "$1"
$CONTAINER_RUNTIME run --pull always --user "$(id -u):$(id -g)" --rm -v "$(pwd)":/src -w /src -v $AZURE_CONFIG_DIR:/azureconfig -e AZURE_CONFIG_DIR=/azureconfig -e GITHUB_TOKEN -e GITHUB_REPOSITORY -e ARM_SUBSCRIPTION_ID -e ARM_TENANT_ID -e ARM_CLIENT_ID -e GITHUB_REPOSITORY_OWNER mcr.microsoft.com/azterraform make "$1"
else
make "$1"
fi
2 changes: 1 addition & 1 deletion avm.bat
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ IF "%~1"=="" (
)

REM Run the make target with CONTAINER_RUNTIME
%CONTAINER_RUNTIME% run --pull always --rm -v "%cd%":/src -w /src --user "1000:1000" -e ARM_SUBSCRIPTION_ID -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER mcr.microsoft.com/azterraform make %1
%CONTAINER_RUNTIME% run --pull always --rm -v "%cd%":/src -w /src --user "1000:1000" -e GITHUB_TOKEN -e ARM_SUBSCRIPTION_ID -e ARM_TENANT_ID -e ARM_CLIENT_ID -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER mcr.microsoft.com/azterraform make %1

ENDLOCAL
2 changes: 1 addition & 1 deletion examples/windows_w_gallery_application/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ resource "azurerm_storage_account" "app_account" {

resource "azurerm_storage_container" "app_container" {
name = module.naming.storage_container.name_unique
storage_account_name = azurerm_storage_account.app_account.name
container_access_type = "blob"
storage_account_name = azurerm_storage_account.app_account.name
}

resource "azurerm_storage_blob" "app" {
Expand Down
2 changes: 1 addition & 1 deletion examples/windows_w_gallery_application/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ resource "azurerm_storage_account" "app_account" {

resource "azurerm_storage_container" "app_container" {
name = module.naming.storage_container.name_unique
storage_account_name = azurerm_storage_account.app_account.name
container_access_type = "blob"
storage_account_name = azurerm_storage_account.app_account.name
}

resource "azurerm_storage_blob" "app" {
Expand Down
2 changes: 1 addition & 1 deletion examples/windows_w_run_command/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ resource "azurerm_storage_account" "this" {

resource "azurerm_storage_container" "this" {
name = "example-sc"
storage_account_name = azurerm_storage_account.this.name
container_access_type = "blob"
storage_account_name = azurerm_storage_account.this.name
}

resource "azurerm_storage_blob" "example1" {
Expand Down
2 changes: 1 addition & 1 deletion examples/windows_w_run_command/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ resource "azurerm_storage_account" "this" {

resource "azurerm_storage_container" "this" {
name = "example-sc"
storage_account_name = azurerm_storage_account.this.name
container_access_type = "blob"
storage_account_name = azurerm_storage_account.this.name
}

resource "azurerm_storage_blob" "example1" {
Expand Down