Skip to content
This repository has been archived by the owner on Feb 14, 2024. It is now read-only.

Commit

Permalink
chore(modules)!: Rename lb modules (#100)
Browse files Browse the repository at this point in the history
* chore(modules)!: Rename lb_tcp_external to lb_external
* chore(modules)!: Rename lb_tcp_internal to lb_internal
  • Loading branch information
michalbil authored May 30, 2022
1 parent 9de24dc commit 6ec771e
Show file tree
Hide file tree
Showing 22 changed files with 35 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ repos:
--args=--only=terraform_workspace_remote,
]
- repo: https://github.com/bridgecrewio/checkov.git
rev: '2.0.1075'
rev: '2.0.1175'
hooks:
- id: checkov
verbose: true
Expand Down
4 changes: 2 additions & 2 deletions examples/autoscale/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ terraform apply
|------|--------|---------|
| <a name="module_autoscale"></a> [autoscale](#module\_autoscale) | ../../modules/autoscale | n/a |
| <a name="module_bootstrap"></a> [bootstrap](#module\_bootstrap) | ../../modules/bootstrap/ | n/a |
| <a name="module_extlb"></a> [extlb](#module\_extlb) | ../../modules/lb_tcp_external/ | n/a |
| <a name="module_extlb"></a> [extlb](#module\_extlb) | ../../modules/lb_external/ | n/a |
| <a name="module_iam_service_account"></a> [iam\_service\_account](#module\_iam\_service\_account) | ../../modules/iam_service_account/ | n/a |
| <a name="module_intlb"></a> [intlb](#module\_intlb) | ../../modules/lb_tcp_internal/ | n/a |
| <a name="module_intlb"></a> [intlb](#module\_intlb) | ../../modules/lb_internal/ | n/a |
| <a name="module_jumphost"></a> [jumphost](#module\_jumphost) | ../../modules/vmseries | n/a |
| <a name="module_jumpvpc"></a> [jumpvpc](#module\_jumpvpc) | ../../modules/vpc | n/a |
| <a name="module_mgmt_cloud_nat"></a> [mgmt\_cloud\_nat](#module\_mgmt\_cloud\_nat) | terraform-google-modules/cloud-nat/google | =1.2 |
Expand Down
8 changes: 4 additions & 4 deletions examples/autoscale/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ module "autoscale" {
}

#-----------------------------------------------------------------------------------------------
# Regional Internal TCP Load Balancer
# Regional Internal TCP/UDP Load Balancer
#
# It is not strictly required part of this example.
# It's here just to show how to integrate it with auto-scaling.

module "intlb" {
source = "../../modules/lb_tcp_internal/"
source = "../../modules/lb_internal/"

name = var.intlb_name
network = module.vpc.networks[var.intlb_network].name
Expand All @@ -91,13 +91,13 @@ module "intlb" {
}

#-----------------------------------------------------------------------------------------------
# Regional External TCP Network Load Balancer
# Regional External Network Load Balancer
#
# It is not strictly required part of this example.
# It's here just to show how to integrate it with auto-scaling.

module "extlb" {
source = "../../modules/lb_tcp_external/"
source = "../../modules/lb_external/"

name = var.extlb_name
rules = { (var.extlb_name) = { port_range = 80 } }
Expand Down
4 changes: 2 additions & 2 deletions examples/common_firewall/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
|------|--------|---------|
| <a name="module_bootstrap"></a> [bootstrap](#module\_bootstrap) | ../../modules/bootstrap/ | n/a |
| <a name="module_iam_service_account"></a> [iam\_service\_account](#module\_iam\_service\_account) | ../../modules/iam_service_account/ | n/a |
| <a name="module_lb_tcp_external"></a> [lb\_tcp\_external](#module\_lb\_tcp\_external) | ../../modules/lb_tcp_external/ | n/a |
| <a name="module_lb_tcp_internal"></a> [lb\_tcp\_internal](#module\_lb\_tcp\_internal) | ../../modules/lb_tcp_internal | n/a |
| <a name="module_lb_external"></a> [lb\_external](#module\_lb\_external) | ../../modules/lb_external/ | n/a |
| <a name="module_lb_internal"></a> [lb\_internal](#module\_lb\_internal) | ../../modules/lb_internal | n/a |
| <a name="module_mgmt_cloud_nat"></a> [mgmt\_cloud\_nat](#module\_mgmt\_cloud\_nat) | terraform-google-modules/cloud-nat/google | =1.2 |
| <a name="module_vmseries"></a> [vmseries](#module\_vmseries) | ../../modules/vmseries | n/a |
| <a name="module_vpc"></a> [vpc](#module\_vpc) | ../../modules/vpc | n/a |
Expand Down
8 changes: 4 additions & 4 deletions examples/common_firewall/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ module "vmseries" {

# Due to intranet load balancer solution - DNAT for healthchecks traffic should be configured on firewall.
# Source: https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA10g000000PP9QCAW
module "lb_tcp_internal" {
source = "../../modules/lb_tcp_internal"
module "lb_internal" {
source = "../../modules/lb_internal"

name = "${var.name_prefix}fw-ilb"
backends = { for k, v in module.vmseries : k => v.instance_group_self_link }
Expand All @@ -137,8 +137,8 @@ module "lb_tcp_internal" {
all_ports = true
}

module "lb_tcp_external" {
source = "../../modules/lb_tcp_external/"
module "lb_external" {
source = "../../modules/lb_external/"

instances = [for k, v in module.vmseries : module.vmseries[k].self_link]

Expand Down
6 changes: 3 additions & 3 deletions examples/hub_spoke_common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,9 @@ You have completed the architecture blueprint guide. You have learned how to se
|------|--------|---------|
| <a name="module_bootstrap"></a> [bootstrap](#module\_bootstrap) | ../../modules/bootstrap/ | n/a |
| <a name="module_iam_service_account"></a> [iam\_service\_account](#module\_iam\_service\_account) | ../../modules/iam_service_account/ | n/a |
| <a name="module_lb_tcp_external"></a> [lb\_tcp\_external](#module\_lb\_tcp\_external) | ../../modules/lb_tcp_external/ | n/a |
| <a name="module_lb_tcp_internal"></a> [lb\_tcp\_internal](#module\_lb\_tcp\_internal) | ../../modules/lb_tcp_internal | n/a |
| <a name="module_spoke1_ilb"></a> [spoke1\_ilb](#module\_spoke1\_ilb) | ../../modules/lb_tcp_internal | n/a |
| <a name="module_lb_external"></a> [lb\_external](#module\_lb\_external) | ../../modules/lb_external/ | n/a |
| <a name="module_lb_internal"></a> [lb\_internal](#module\_lb\_internal) | ../../modules/lb_internal | n/a |
| <a name="module_spoke1_ilb"></a> [spoke1\_ilb](#module\_spoke1\_ilb) | ../../modules/lb_internal | n/a |
| <a name="module_vmseries"></a> [vmseries](#module\_vmseries) | ../../modules/vmseries | n/a |
| <a name="module_vpc_mgmt"></a> [vpc\_mgmt](#module\_vpc\_mgmt) | terraform-google-modules/network/google | ~> 4.0 |
| <a name="module_vpc_spoke1"></a> [vpc\_spoke1](#module\_vpc\_spoke1) | terraform-google-modules/network/google | ~> 4.0 |
Expand Down
10 changes: 5 additions & 5 deletions examples/hub_spoke_common/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ module "vmseries" {

# Due to intranet load balancer solution - DNAT for healthchecks traffic should be configured on firewall.
# Source: https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA10g000000PP9QCAW
module "lb_tcp_internal" {
source = "../../modules/lb_tcp_internal"
module "lb_internal" {
source = "../../modules/lb_internal"

name = "${local.prefix}fw-ilb"
backends = { for k, v in module.vmseries : k => v.instance_group_self_link }
Expand All @@ -193,8 +193,8 @@ module "lb_tcp_internal" {
all_ports = true
}

module "lb_tcp_external" {
source = "../../modules/lb_tcp_external/"
module "lb_external" {
source = "../../modules/lb_external/"

instances = [for k, v in module.vmseries : module.vmseries[k].self_link]
name = "${local.prefix}fw-extlb"
Expand Down Expand Up @@ -363,7 +363,7 @@ resource "google_compute_instance_group" "spoke1_ig" {
}

module "spoke1_ilb" {
source = "../../modules/lb_tcp_internal"
source = "../../modules/lb_internal"

name = "${local.prefix}spoke1-ilb"
backends = { 0 = google_compute_instance_group.spoke1_lb.self_link }
Expand Down
4 changes: 2 additions & 2 deletions examples/hub_spoke_common/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
output "ext_lb_url" {
value = "http://${module.lb_tcp_external.ip_addresses["rule1"]}"
value = "http://${module.lb_external.ip_addresses["rule1"]}"
}

output "ssh_to_spoke2" {
value = "ssh ${var.spoke_vm_user}@${module.lb_tcp_external.ip_addresses["rule2"]}"
value = "ssh ${var.spoke_vm_user}@${module.lb_external.ip_addresses["rule2"]}"
}

output "vmseries01_access" {
Expand Down
4 changes: 2 additions & 2 deletions examples/lb_http_ext_global/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@

| Name | Source | Version |
|------|--------|---------|
| <a name="module_extlb"></a> [extlb](#module\_extlb) | ../../modules/lb_tcp_external/ | n/a |
| <a name="module_extlb"></a> [extlb](#module\_extlb) | ../../modules/lb_external/ | n/a |
| <a name="module_glb"></a> [glb](#module\_glb) | ../../modules/lb_http_ext_global | n/a |
| <a name="module_ilb"></a> [ilb](#module\_ilb) | ../../modules/lb_tcp_internal | n/a |
| <a name="module_ilb"></a> [ilb](#module\_ilb) | ../../modules/lb_internal | n/a |
| <a name="module_vmseries"></a> [vmseries](#module\_vmseries) | ../../modules/vmseries/ | n/a |
| <a name="module_vpc"></a> [vpc](#module\_vpc) | ../../modules/vpc/ | n/a |

Expand Down
8 changes: 4 additions & 4 deletions examples/lb_http_ext_global/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ module "glb" {
}

#########################################################################
# Internal TCP Load Balancer
# Internal TCP/UDP Load Balancer
#
# It's optional, just showing it can co-exist with a Global one.

module "ilb" {
source = "../../modules/lb_tcp_internal"
source = "../../modules/lb_internal"
name = "${var.name_prefix}ilb"
network = local.vpc
subnetwork = local.subnet
Expand All @@ -62,12 +62,12 @@ module "ilb" {
}

#########################################################################
# External Regional TCP Load Balancer
# External Regional Network Load Balancer
#
# It's optional, just showing it can co-exist with other load balancers.

module "extlb" {
source = "../../modules/lb_tcp_external/"
source = "../../modules/lb_external/"
name = "${var.name_prefix}extlb"
instances = [for k, v in module.vmseries : module.vmseries[k].self_link]
rules = {
Expand Down
2 changes: 1 addition & 1 deletion modules/autoscale/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,6 @@ No modules.

| Name | Description |
|------|-------------|
| <a name="output_backends"></a> [backends](#output\_backends) | Map of instance group (IG) identifiers, suitable for use in module lb\_tcp\_internal as input `backends`. |
| <a name="output_backends"></a> [backends](#output\_backends) | Map of instance group (IG) identifiers, suitable for use in module lb\_internal as input `backends`. |
| <a name="output_instance_group_manager"></a> [instance\_group\_manager](#output\_instance\_group\_manager) | n/a |
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
2 changes: 1 addition & 1 deletion modules/autoscale/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ output "instance_group_manager" {
}

output "backends" {
description = "Map of instance group (IG) identifiers, suitable for use in module lb_tcp_internal as input `backends`."
description = "Map of instance group (IG) identifiers, suitable for use in module lb_internal as input `backends`."
value = { for k, v in google_compute_instance_group_manager.this : k => v.instance_group }
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ No modules.
| <a name="input_health_check"></a> [health\_check](#input\_health\_check) | (Optional) Name of either the global google\_compute\_health\_check or google\_compute\_region\_health\_check to use. Conflicts with health\_check\_port. | `string` | `null` | no |
| <a name="input_health_check_port"></a> [health\_check\_port](#input\_health\_check\_port) | (Optional) Port number for TCP healthchecking, default 22. This setting is ignored when `health_check` is provided. | `number` | `22` | no |
| <a name="input_ip_address"></a> [ip\_address](#input\_ip\_address) | n/a | `any` | `null` | no |
| <a name="input_ip_protocol"></a> [ip\_protocol](#input\_ip\_protocol) | n/a | `string` | `"TCP"` | no |
| <a name="input_ip_protocol"></a> [ip\_protocol](#input\_ip\_protocol) | The IP protocol for the frontend forwarding rule, valid values are TCP and UDP. | `string` | `"TCP"` | no |
| <a name="input_name"></a> [name](#input\_name) | Name of the load balancer (that is, both the forwarding rule and the backend service) | `string` | n/a | yes |
| <a name="input_network"></a> [network](#input\_network) | n/a | `any` | `null` | no |
| <a name="input_ports"></a> [ports](#input\_ports) | Which port numbers are forwarded to the backends (up to 5 ports). Conflicts with all\_ports. | `list(number)` | `[]` | no |
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ variable "ip_address" {
}

variable "ip_protocol" {
default = "TCP"
description = "The IP protocol for the frontend forwarding rule, valid values are TCP and UDP."
default = "TCP"
type = string
}

variable "all_ports" {
Expand Down
File renamed without changes.

0 comments on commit 6ec771e

Please sign in to comment.