waf

package
v0.14.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package waf contains the rules for Well Architected Alignment. To add a new rule, create a new file and add a new function that returns a new rule. Then add the rule to the Rules slice.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRules added in v0.8.0

func GetRules() []tflint.Rule

GetRules uses reflection to iterate over all the methods of the WafRules struct and add them to a slice of Rules to be included in the ruleset. See `GetRules()` implementation for more detail.

Types

type WafRules added in v0.8.0

type WafRules struct{}

WafRules is a helper struct. Methods are created on this type that generate the rules for the WAF package. We then use reflection to automatically generate a slice of the rules to add the the ruleset.

func (WafRules) AzurermApplicationGatewaySku added in v0.8.0

func (wf WafRules) AzurermApplicationGatewaySku() *attrvalue.SimpleRule[string]

func (WafRules) AzurermApplicationGatewayZones added in v0.8.0

func (wf WafRules) AzurermApplicationGatewayZones() *attrvalue.SetRule[int]

func (WafRules) AzurermCosmosDbAccountBackupMode added in v0.8.0

func (wf WafRules) AzurermCosmosDbAccountBackupMode() *attrvalue.SimpleRule[string]

func (WafRules) AzurermKubernetesClusterZones added in v0.8.0

func (wf WafRules) AzurermKubernetesClusterZones() *attrvalue.SetRule[int]

func (WafRules) AzurermLbSku added in v0.8.0

func (wf WafRules) AzurermLbSku() *attrvalue.SimpleRule[string]

func (WafRules) AzurermLegacyVirtualMachineNotAllowed added in v0.10.0

func (wf WafRules) AzurermLegacyVirtualMachineNotAllowed() *attrvalue.UnknownValueRule

This test checks for the use of resource type azurerm_virtual_machine since the azurerm_windows_virtual_machine and azurerm_linux_virtual_machine resources don't support unmanaged disks Since a test doesn't exist for checking the use of disallowed resource types, this uses an unknown value check on a required variable (name) to flag use of this resource.

func (WafRules) AzurermLinuxVirtualMachineOSDiskDefaultSSD added in v0.10.0

func (wf WafRules) AzurermLinuxVirtualMachineOSDiskDefaultSSD() *attrvalue.SimpleRule[string]

This test checks to see if a linux virtual machine's OS disk is one of the premium sku's

func (WafRules) AzurermManagedDiskStorageAccountType added in v0.10.0

func (wf WafRules) AzurermManagedDiskStorageAccountType() *attrvalue.SimpleRule[string]

This test validates where managed disk resource types are either premium or ultra. TODO: Ensure that this doesn't conflict with other module outcomes.

func (WafRules) AzurermMySqlFlexibleServerCustomMaintenanceSchedule added in v0.8.0

func (wf WafRules) AzurermMySqlFlexibleServerCustomMaintenanceSchedule() *attrvalue.SimpleRule[string]

func (WafRules) AzurermMySqlFlexibleServerZoneRedundancy added in v0.8.0

func (wf WafRules) AzurermMySqlFlexibleServerZoneRedundancy() *attrvalue.SimpleRule[string]

func (WafRules) AzurermPostgreSqlFlexibleServerCustomMaintenanceSchedule added in v0.8.0

func (wf WafRules) AzurermPostgreSqlFlexibleServerCustomMaintenanceSchedule() *attrvalue.SimpleRule[string]

func (WafRules) AzurermPostgreSqlFlexibleServerZoneRedundancy added in v0.8.0

func (wf WafRules) AzurermPostgreSqlFlexibleServerZoneRedundancy() *attrvalue.SimpleRule[string]

func (WafRules) AzurermPublicIpSku added in v0.8.0

func (wf WafRules) AzurermPublicIpSku() *attrvalue.SimpleRule[string]

func (WafRules) AzurermPublicIpZones added in v0.8.0

func (wf WafRules) AzurermPublicIpZones() *attrvalue.SetRule[int]

func (WafRules) AzurermServicePlanZoneBalancingEnabled added in v0.8.0

func (wf WafRules) AzurermServicePlanZoneBalancingEnabled() *attrvalue.SimpleRule[bool]

func (WafRules) AzurermStorageAccountAccountReplicationType added in v0.8.0

func (wf WafRules) AzurermStorageAccountAccountReplicationType() *attrvalue.SimpleRule[string]

func (WafRules) AzurermVirtualMachineZoneUnknown added in v0.8.0

func (wf WafRules) AzurermVirtualMachineZoneUnknown() *attrvalue.UnknownValueRule

func (WafRules) AzurermVirtualMachineZonesUnknown added in v0.8.0

func (wf WafRules) AzurermVirtualMachineZonesUnknown() *attrvalue.UnknownValueRule

func (WafRules) AzurermVirtualNetworkGatewaySku added in v0.8.0

func (wf WafRules) AzurermVirtualNetworkGatewaySku() *attrvalue.SimpleRule[string]

func (WafRules) AzurermVirtualNetworkGatewayVpnActiveActive added in v0.10.0

func (wf WafRules) AzurermVirtualNetworkGatewayVpnActiveActive() *attrvalue.SimpleRule[bool]

func (WafRules) AzurermWindowsVirtualMachineOSDiskDefaultSSD added in v0.10.0

func (wf WafRules) AzurermWindowsVirtualMachineOSDiskDefaultSSD() *attrvalue.SimpleRule[string]

This test checks to see if a windows virtual machine's OS disk is one of the premium sku's

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL