-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(terraform): Update CKV_AZURE_228 for automatic calculation (#6714)
* Update check * fix lint
- Loading branch information
Showing
3 changed files
with
51 additions
and
26 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
47 changes: 32 additions & 15 deletions
47
tests/terraform/checks/resource/azure/example_EventHubNamespaceZoneRedundant/main.tf
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,29 +1,46 @@ | ||
provider "azurerm" { | ||
features {} | ||
} | ||
|
||
resource "azurerm_resource_group" "pass" { | ||
name = "pass-resources" | ||
location = "West Europe" | ||
} | ||
|
||
resource "azurerm_eventhub_namespace" "pass" { | ||
name = "example-namespace" | ||
location = azurerm_resource_group.example.location | ||
resource_group_name = azurerm_resource_group.example.name | ||
name = "pass-eventhubns" | ||
location = azurerm_resource_group.pass.location | ||
resource_group_name = azurerm_resource_group.pass.name | ||
sku = "Standard" | ||
capacity = 2 | ||
minimum_tls_version = 1.2 | ||
zone_redundant = true | ||
|
||
tags = { | ||
environment = "Production" | ||
} | ||
} | ||
|
||
resource "azurerm_eventhub_namespace" "fail2" { | ||
name = "eventhub-primary" | ||
location = azurerm_resource_group.example.location | ||
resource_group_name = azurerm_resource_group.example.name | ||
resource "azurerm_eventhub_namespace" "unknown" { | ||
name = "unknown-eventhubns" | ||
location = azurerm_resource_group.foo.location | ||
resource_group_name = azurerm_resource_group.foo.name | ||
sku = "Standard" | ||
capacity = 2 | ||
tags = { | ||
environment = "Production" | ||
} | ||
} | ||
|
||
resource "azurerm_resource_group" "fail" { | ||
name = "fail-resources" | ||
location = "South Africa West" | ||
} | ||
|
||
resource "azurerm_eventhub_namespace" "fail" { | ||
name = "eventhub-primary" | ||
location = azurerm_resource_group.example.location | ||
resource_group_name = azurerm_resource_group.example.name | ||
name = "fail-eventhubns" | ||
location = azurerm_resource_group.fail.location | ||
resource_group_name = azurerm_resource_group.fail.name | ||
sku = "Standard" | ||
minimum_tls_version = "1.1" | ||
zone_redundant = false | ||
capacity = 2 | ||
tags = { | ||
environment = "Production" | ||
} | ||
} |
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