Skip to content

Commit

Permalink
Add Trivy ignore comment to examples
Browse files Browse the repository at this point in the history
  • Loading branch information
rswrz committed Jan 8, 2025
1 parent 0084509 commit 03dca2c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ As documented on the [image](#input_image) input variable, it is possible to use

This example demonstrates the usage of the virtual machine module with default settings. It sets up all necessary dependencies, including a resource group, virtual network, subnet, recovery services vault, backup policy, and key vault, to ensure seamless deployment.

> [!TIP]
> Our module enables password-based login for Linux virtual machines, configurable via the `authentication_type` input variable. If the [`disable_password_authentication`](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/linux_virtual_machine.html#disable_password_authentication-1) setting on the [`azurerm_linux_virtual_machine`](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/linux_virtual_machine) resource within this module is not explicitly set to `false`, [Trivy](https://trivy.dev) will flag a high-severity warning. To suppress this warning, add the comment `#trivy:ignore:avd-azu-0039` directly above the Terraform module definition, as shown in the example below.
```hcl
resource "azurerm_resource_group" "example" {
name = "rg-example-dev-we-01"
Expand Down Expand Up @@ -91,6 +94,7 @@ resource "azurerm_key_vault" "example" {
}
}
#trivy:ignore:avd-azu-0039
module "example" {
source = "cloudeteer/vm/azurerm"
Expand Down
1 change: 1 addition & 0 deletions examples/external_key_vault/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ variable "location" {
type = string
}

#trivy:ignore:avd-azu-0039
module "example" {
source = "cloudeteer/vm/azurerm"

Expand Down
3 changes: 3 additions & 0 deletions examples/usage/main.md
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
This example demonstrates the usage of the virtual machine module with default settings. It sets up all necessary dependencies, including a resource group, virtual network, subnet, recovery services vault, backup policy, and key vault, to ensure seamless deployment.

> [!TIP]
> Our module enables password-based login for Linux virtual machines, configurable via the `authentication_type` input variable. If the [`disable_password_authentication`](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/linux_virtual_machine.html#disable_password_authentication-1) setting on the [`azurerm_linux_virtual_machine`](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/linux_virtual_machine) resource within this module is not explicitly set to `false`, [Trivy](https://trivy.dev) will flag a high-severity warning. To suppress this warning, add the comment `#trivy:ignore:avd-azu-0039` directly above the Terraform module definition, as shown in the example below.
1 change: 1 addition & 0 deletions examples/usage/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ resource "azurerm_key_vault" "example" {
}
}

#trivy:ignore:avd-azu-0039
module "example" {
source = "cloudeteer/vm/azurerm"

Expand Down

0 comments on commit 03dca2c

Please sign in to comment.