-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add --skip to exclude resources (#155)
* add --invertFilter to reverse the filter function * remove duplicate snippet * change inverFilter to skip * fix formatting * only evaluate skip if it is set Co-authored-by: Duncan Bakker <[email protected]>
- Loading branch information
Showing
9 changed files
with
174 additions
and
10 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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
suites: | ||
- azurerm_skip |
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
resource "azurerm_resource_group" "example" { | ||
name = "example-resources" | ||
location = "West Europe" | ||
} | ||
|
||
resource "azurerm_virtual_network" "example" { | ||
name = "example-network" | ||
resource_group_name = azurerm_resource_group.example.name | ||
location = azurerm_resource_group.example.location | ||
address_space = ["10.254.0.0/16"] | ||
tags = local.terratag_added_main | ||
} | ||
|
||
resource "azurerm_subnet" "frontend" { | ||
name = "frontend" | ||
resource_group_name = azurerm_resource_group.example.name | ||
virtual_network_name = azurerm_virtual_network.example.name | ||
address_prefixes = ["10.254.0.0/24"] | ||
} | ||
|
||
resource "azurerm_subnet" "backend" { | ||
name = "backend" | ||
resource_group_name = azurerm_resource_group.example.name | ||
virtual_network_name = azurerm_virtual_network.example.name | ||
address_prefixes = ["10.254.2.0/24"] | ||
} | ||
|
||
resource "azurerm_public_ip" "example" { | ||
name = "example-pip" | ||
resource_group_name = azurerm_resource_group.example.name | ||
location = azurerm_resource_group.example.location | ||
allocation_method = "Dynamic" | ||
tags = local.terratag_added_main | ||
} | ||
|
||
# since these variables are re-used - a locals block makes this more maintainable | ||
locals { | ||
backend_address_pool_name = "${azurerm_virtual_network.example.name}-beap" | ||
frontend_port_name = "${azurerm_virtual_network.example.name}-feport" | ||
frontend_ip_configuration_name = "${azurerm_virtual_network.example.name}-feip" | ||
http_setting_name = "${azurerm_virtual_network.example.name}-be-htst" | ||
listener_name = "${azurerm_virtual_network.example.name}-httplstn" | ||
request_routing_rule_name = "${azurerm_virtual_network.example.name}-rqrt" | ||
redirect_configuration_name = "${azurerm_virtual_network.example.name}-rdrcfg" | ||
} | ||
|
||
locals { | ||
terratag_added_main = {"env0_environment_id"="40907eff-cf7c-419a-8694-e1c6bf1d1168","env0_project_id"="43fd4ff1-8d37-4d9d-ac97-295bd850bf94"} | ||
} | ||
|
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
|
||
resource "azurerm_resource_group" "example" { | ||
name = "example-resources" | ||
location = "West Europe" | ||
} | ||
|
||
resource "azurerm_virtual_network" "example" { | ||
name = "example-network" | ||
resource_group_name = azurerm_resource_group.example.name | ||
location = azurerm_resource_group.example.location | ||
address_space = ["10.254.0.0/16"] | ||
} | ||
|
||
resource "azurerm_subnet" "frontend" { | ||
name = "frontend" | ||
resource_group_name = azurerm_resource_group.example.name | ||
virtual_network_name = azurerm_virtual_network.example.name | ||
address_prefixes = ["10.254.0.0/24"] | ||
} | ||
|
||
resource "azurerm_subnet" "backend" { | ||
name = "backend" | ||
resource_group_name = azurerm_resource_group.example.name | ||
virtual_network_name = azurerm_virtual_network.example.name | ||
address_prefixes = ["10.254.2.0/24"] | ||
} | ||
|
||
resource "azurerm_public_ip" "example" { | ||
name = "example-pip" | ||
resource_group_name = azurerm_resource_group.example.name | ||
location = azurerm_resource_group.example.location | ||
allocation_method = "Dynamic" | ||
} | ||
|
||
# since these variables are re-used - a locals block makes this more maintainable | ||
locals { | ||
backend_address_pool_name = "${azurerm_virtual_network.example.name}-beap" | ||
frontend_port_name = "${azurerm_virtual_network.example.name}-feport" | ||
frontend_ip_configuration_name = "${azurerm_virtual_network.example.name}-feip" | ||
http_setting_name = "${azurerm_virtual_network.example.name}-be-htst" | ||
listener_name = "${azurerm_virtual_network.example.name}-httplstn" | ||
request_routing_rule_name = "${azurerm_virtual_network.example.name}-rqrt" | ||
redirect_configuration_name = "${azurerm_virtual_network.example.name}-rdrcfg" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
resource "azurerm_resource_group" "example" { | ||
name = "example-resources" | ||
location = "West Europe" | ||
} | ||
|
||
resource "azurerm_virtual_network" "example" { | ||
name = "example-network" | ||
resource_group_name = azurerm_resource_group.example.name | ||
location = azurerm_resource_group.example.location | ||
address_space = ["10.254.0.0/16"] | ||
} | ||
|
||
resource "azurerm_subnet" "frontend" { | ||
name = "frontend" | ||
resource_group_name = azurerm_resource_group.example.name | ||
virtual_network_name = azurerm_virtual_network.example.name | ||
address_prefixes = ["10.254.0.0/24"] | ||
} | ||
|
||
resource "azurerm_subnet" "backend" { | ||
name = "backend" | ||
resource_group_name = azurerm_resource_group.example.name | ||
virtual_network_name = azurerm_virtual_network.example.name | ||
address_prefixes = ["10.254.2.0/24"] | ||
} | ||
|
||
resource "azurerm_public_ip" "example" { | ||
name = "example-pip" | ||
resource_group_name = azurerm_resource_group.example.name | ||
location = azurerm_resource_group.example.location | ||
allocation_method = "Dynamic" | ||
} | ||
|
||
# since these variables are re-used - a locals block makes this more maintainable | ||
locals { | ||
backend_address_pool_name = "${azurerm_virtual_network.example.name}-beap" | ||
frontend_port_name = "${azurerm_virtual_network.example.name}-feport" | ||
frontend_ip_configuration_name = "${azurerm_virtual_network.example.name}-feip" | ||
http_setting_name = "${azurerm_virtual_network.example.name}-be-htst" | ||
listener_name = "${azurerm_virtual_network.example.name}-httplstn" | ||
request_routing_rule_name = "${azurerm_virtual_network.example.name}-rqrt" | ||
redirect_configuration_name = "${azurerm_virtual_network.example.name}-rdrcfg" | ||
} |