Skip to content

Commit

Permalink
Merge pull request #1094 from eliamaldini/elia-glb-mig
Browse files Browse the repository at this point in the history
Added GLB example with MIG as backend
  • Loading branch information
juliocc committed Jan 31, 2023
2 parents 5c579cd + e962d07 commit 725c948
Showing 1 changed file with 60 additions and 1 deletion.
61 changes: 60 additions & 1 deletion modules/net-glb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,66 @@ module "glb-0" {
}
# tftest modules=1 resources=6
```
#### Managed Instance Groups

This example shows how to use the module with a manage instance group as backend:

```hcl
module "win-template" {
source = "./fabric/modules/compute-vm"
project_id = "myprj"
zone = "europe-west8-a"
name = "win-template"
instance_type = "n2d-standard-2"
create_template = true
boot_disk = {
image = "projects/windows-cloud/global/images/windows-server-2019-dc-v20221214"
type = "pd-balanced"
size = 70
}
network_interfaces = [{
network = var.vpc.self_link
subnetwork = var.subnet.self_link
nat = false
addresses = null
}]
}
module "win-mig" {
source = "./fabric/modules/compute-mig"
project_id = "myprj"
location = "europe-west8-a"
name = "win-mig"
instance_template = module.win-template.template.self_link
autoscaler_config = {
max_replicas = 3
min_replicas = 1
cooldown_period = 30
scaling_signals = {
cpu_utilization = {
target = 0.80
}
}
}
named_ports = {
http = 80
}
}
module "glb-0" {
source = "./fabric/modules/net-glb"
project_id = "myprj"
name = "glb-test-0"
backend_service_configs = {
default = {
backends = [
{ backend = module.win-mig.group_manager.instance_group }
]
}
}
}
# tftest modules=3 resources=8
```

#### Storage Buckets

Expand Down Expand Up @@ -529,7 +589,6 @@ The module also allows managing managed and self-managed SSL certificates via th
THe [HTTPS example above](#minimal-https-examples) shows how to configure manage certificated, the following example shows how to use an unmanaged (or self managed) certificate. The example uses Terraform resource for the key and certificate so that the we don't depend on external files when running tests, in real use the key and certificate are generally provided via external files read by the Terraform `file()` function.

```hcl
resource "tls_private_key" "default" {
algorithm = "RSA"
rsa_bits = 4096
Expand Down

0 comments on commit 725c948

Please sign in to comment.