Skip to content
Merged
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
1 change: 1 addition & 0 deletions .github/workflows/managed-pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ jobs:
shell: bash
env:
AVM_EXAMPLE: ${{ matrix.example }}
AVM_RUNNING_IN_GITHUB_ACTIONS: true
run: |
set -e

Expand Down
30 changes: 30 additions & 0 deletions porch-configs/test-examples.porch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,36 @@ commands:
find . -type f -name .terraform.lock.hcl | xargs -n1 rm -f && \
find . -type f -name *.tfstate* | xargs -n1 rm -f

- type: foreachdirectory
name: for each example clean up if not matching AVM_EXAMPLE
depth: 1
include_hidden: false
skip_on_not_exist: true
working_directory: "./examples"
env:
TF_IN_AUTOMATION: "1"
mode: parallel
commands:
- type: shell
name: Check for and remove non-matching examples
command_line: |
if [ -z "$AVM_EXAMPLE" ]; then
echo "AVM_EXAMPLE is not set. Continue."
exit 0
fi

if [ -z "$AVM_RUNNING_IN_GITHUB_ACTIONS" ]; then
echo "AVM_RUNNING_IN_GITHUB_ACTIONS is not set. Continue."
exit 0
fi

if [ "$AVM_EXAMPLE" != "$ITEM" ]; then
echo "AVM_EXAMPLE is set to '$AVM_EXAMPLE', but the current example is '$ITEM'." 1>&2
echo "We are running in GitHub Actions, so we can safely remove this example." 1>&2
rm -r -f $ITEM
exit 0
fi

- type: foreachdirectory
name: for each example
depth: 1
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<!-- BEGIN_TF_DOCS -->
<!-- Code generated by terraform-docs. DO NOT EDIT. -->
# Ignored Example

```hcl
module "test" {
source = "../../"

location = "westus3"
}
```

<!-- markdownlint-disable MD033 -->
## Requirements

The following requirements are needed by this module:

- <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) (>= 1.9.0, < 2.0.0)

## Resources

No resources.

<!-- markdownlint-disable MD013 -->
## Required Inputs

No required inputs.

## Optional Inputs

No optional inputs.

## Outputs

No outputs.

## Modules

The following Modules are called:

### <a name="module_test"></a> [test](#module\_test)

Source: ../../

Version:

<!-- markdownlint-disable-next-line MD041 -->
## Data Collection

The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at <https://go.microsoft.com/fwlink/?LinkID=824704>. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
<!-- END_TF_DOCS -->
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<!-- markdownlint-disable-next-line MD041 -->
## Data Collection

The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at <https://go.microsoft.com/fwlink/?LinkID=824704>. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Ignored Example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module "test" {
source = "../../"

location = "westus3"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
terraform {
required_version = ">= 1.9.0, < 2.0.0"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<!-- BEGIN_TF_DOCS -->
<!-- Code generated by terraform-docs. DO NOT EDIT. -->
# Second Example

```hcl
module "test" {
source = "../../"

location = "westus3"
}
```

<!-- markdownlint-disable MD033 -->
## Requirements

The following requirements are needed by this module:

- <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) (>= 1.9.0, < 2.0.0)

## Resources

No resources.

<!-- markdownlint-disable MD013 -->
## Required Inputs

No required inputs.

## Optional Inputs

No optional inputs.

## Outputs

No outputs.

## Modules

The following Modules are called:

### <a name="module_test"></a> [test](#module\_test)

Source: ../../

Version:

<!-- markdownlint-disable-next-line MD041 -->
## Data Collection

The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at <https://go.microsoft.com/fwlink/?LinkID=824704>. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
<!-- END_TF_DOCS -->
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<!-- markdownlint-disable-next-line MD041 -->
## Data Collection

The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at <https://go.microsoft.com/fwlink/?LinkID=824704>. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Second Example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module "test" {
source = "../../"

location = "westus3"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
terraform {
required_version = ">= 1.9.0, < 2.0.0"
}
Loading