Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/internal/providers/terraform/azure/testdata/lb_rule_test/lb_rule_test.golden b/internal/providers/terraform/azure/testdata/lb_rule_test/lb_rule_test.golden
- index aad5f2b3..83e60818 100644
- --- a/internal/providers/terraform/azure/testdata/lb_rule_test/lb_rule_test.golden
- +++ b/internal/providers/terraform/azure/testdata/lb_rule_test/lb_rule_test.golden
- @@ -1,16 +1,23 @@
- - Name Monthly Qty Unit Monthly Cost
- -
- - azurerm_lb_rule.rules
- - └─ Rule usage 730 hours $7.30
- -
- - azurerm_public_ip.example
- - └─ IP address (static) 730 hours $2.63
- -
- - OVERALL TOTAL $9.93
- + Name Monthly Qty Unit Monthly Cost
- +
- + azurerm_lb.example_withStandardSku
- + └─ Data processed Monthly cost depends on usage: $0.005 per GB
- +
- + azurerm_lb_rule.rules_withStandardSku
- + └─ Rule usage 730 hours $7.30
- +
- + azurerm_public_ip.example_withBasicSku
- + └─ IP address (static) 730 hours $2.63
- +
- + azurerm_public_ip.example_withStandardSku
- + └─ IP address (static) 730 hours $2.63
- +
- + OVERALL TOTAL $12.56
- ──────────────────────────────────
- -4 cloud resources were detected:
- -∙ 2 were estimated
- -∙ 2 were free:
- +7 cloud resources were detected:
- +∙ 4 were estimated, 1 of which include usage-based costs, see https://infracost.io/usage-file
- +∙ 3 were free:
- ∙ 1 x azurerm_lb
- - ∙ 1 x azurerm_resource_group
- \ No newline at end of file
- + ∙ 1 x azurerm_lb_rule
- + ∙ 1 x azurerm_resource_group
- diff --git a/internal/providers/terraform/azure/testdata/lb_rule_test/lb_rule_test.tf b/internal/providers/terraform/azure/testdata/lb_rule_test/lb_rule_test.tf
- index 3f07cbb2..1077badd 100644
- --- a/internal/providers/terraform/azure/testdata/lb_rule_test/lb_rule_test.tf
- +++ b/internal/providers/terraform/azure/testdata/lb_rule_test/lb_rule_test.tf
- @@ -6,17 +6,18 @@ resource "azurerm_resource_group" "example" {
- name = "LoadBalancerRG"
- location = "eastus"
- }
- -resource "azurerm_public_ip" "example" {
- +resource "azurerm_public_ip" "example_withStandardSku" {
- name = "PublicIPForLB"
- location = "West US"
- resource_group_name = azurerm_resource_group.example.name
- allocation_method = "Static"
- }
- -resource "azurerm_lb" "example" {
- +resource "azurerm_lb" "example_withStandardSku" {
- name = "TestLoadBalancer"
- location = "West US"
- resource_group_name = azurerm_resource_group.example.name
- + sku = "Standard"
- frontend_ip_configuration {
- name = "PublicIPAddress"
- @@ -24,7 +25,7 @@ resource "azurerm_lb" "example" {
- }
- }
- -resource "azurerm_lb_rule" "rules" {
- +resource "azurerm_lb_rule" "rules_withStandardSku" {
- loadbalancer_id = azurerm_lb.example.id
- name = "LBRule"
- protocol = "Tcp"
- @@ -32,3 +33,31 @@ resource "azurerm_lb_rule" "rules" {
- backend_port = 3389
- frontend_ip_configuration_name = "PublicIPAddress"
- }
- +
- +resource "azurerm_public_ip" "example_withBasicSku" {
- + name = "PublicIPForLB"
- + location = "West US"
- + resource_group_name = azurerm_resource_group.example.name
- + allocation_method = "Static"
- +}
- +
- +resource "azurerm_lb" "example_withBasicSku" {
- + name = "TestBasicLoadBalancer"
- + location = "West US"
- + resource_group_name = azurerm_resource_group.example.name
- + sku = "Basic"
- +
- + frontend_ip_configuration {
- + name = "PublicIPAddress"
- + public_ip_address_id = azurerm_public_ip.example_withBasicSku.id
- + }
- +}
- +
- +resource "azurerm_lb_rule" "rules_withBasicSku" {
- + loadbalancer_id = azurerm_lb.example_withBasicSku.id
- + name = "LBRule"
- + protocol = "Tcp"
- + frontend_port = 3389
- + backend_port = 3389
- + frontend_ip_configuration_name = "PublicIPAddress"
- +}
- diff --git a/internal/providers/terraform/azure/testdata/lb_rule_v2_test/lb_rule_v2_test.golden b/internal/providers/terraform/azure/testdata/lb_rule_v2_test/lb_rule_v2_test.golden
- index aad5f2b3..83e60818 100644
- --- a/internal/providers/terraform/azure/testdata/lb_rule_v2_test/lb_rule_v2_test.golden
- +++ b/internal/providers/terraform/azure/testdata/lb_rule_v2_test/lb_rule_v2_test.golden
- @@ -1,16 +1,23 @@
- - Name Monthly Qty Unit Monthly Cost
- -
- - azurerm_lb_rule.rules
- - └─ Rule usage 730 hours $7.30
- -
- - azurerm_public_ip.example
- - └─ IP address (static) 730 hours $2.63
- -
- - OVERALL TOTAL $9.93
- + Name Monthly Qty Unit Monthly Cost
- +
- + azurerm_lb.example_withStandardSku
- + └─ Data processed Monthly cost depends on usage: $0.005 per GB
- +
- + azurerm_lb_rule.rules_withStandardSku
- + └─ Rule usage 730 hours $7.30
- +
- + azurerm_public_ip.example_withBasicSku
- + └─ IP address (static) 730 hours $2.63
- +
- + azurerm_public_ip.example_withStandardSku
- + └─ IP address (static) 730 hours $2.63
- +
- + OVERALL TOTAL $12.56
- ──────────────────────────────────
- -4 cloud resources were detected:
- -∙ 2 were estimated
- -∙ 2 were free:
- +7 cloud resources were detected:
- +∙ 4 were estimated, 1 of which include usage-based costs, see https://infracost.io/usage-file
- +∙ 3 were free:
- ∙ 1 x azurerm_lb
- - ∙ 1 x azurerm_resource_group
- \ No newline at end of file
- + ∙ 1 x azurerm_lb_rule
- + ∙ 1 x azurerm_resource_group
- diff --git a/internal/providers/terraform/azure/testdata/lb_rule_v2_test/lb_rule_v2_test.tf b/internal/providers/terraform/azure/testdata/lb_rule_v2_test/lb_rule_v2_test.tf
- index a893e83b..74cb693f 100644
- --- a/internal/providers/terraform/azure/testdata/lb_rule_v2_test/lb_rule_v2_test.tf
- +++ b/internal/providers/terraform/azure/testdata/lb_rule_v2_test/lb_rule_v2_test.tf
- @@ -31,6 +31,7 @@ resource "azurerm_lb" "example" {
- name = "TestLoadBalancer"
- location = "West US"
- resource_group_name = azurerm_resource_group.example.name
- + sku = "Standard"
- frontend_ip_configuration {
- name = "PublicIPAddress"
- @@ -47,3 +48,31 @@ resource "azurerm_lb_rule" "rules" {
- backend_port = 3389
- frontend_ip_configuration_name = "PublicIPAddress"
- }
- +
- +resource "azurerm_public_ip" "example_withBasicSku" {
- + name = "PublicIPForLB"
- + location = "West US"
- + resource_group_name = azurerm_resource_group.example.name
- + allocation_method = "Static"
- +}
- +
- +resource "azurerm_lb" "example_withBasicSku" {
- + name = "TestBasicLoadBalancer"
- + location = "West US"
- + resource_group_name = azurerm_resource_group.example.name
- + sku = "Basic"
- +
- + frontend_ip_configuration {
- + name = "PublicIPAddress"
- + public_ip_address_id = azurerm_public_ip.example_withBasicSku.id
- + }
- +}
- +
- +resource "azurerm_lb_rule" "rules_withBasicSku" {
- + loadbalancer_id = azurerm_lb.example_withBasicSku.id
- + name = "LBRule"
- + protocol = "Tcp"
- + frontend_port = 3389
- + backend_port = 3389
- + frontend_ip_configuration_name = "PublicIPAddress"
- +}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement