Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added GLB example with MIG as backend #1094

Merged
merged 8 commits into from
Jan 31, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
71 changes: 71 additions & 0 deletions modules/net-glb/README.md
Expand Up @@ -214,6 +214,77 @@ 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"

network_interfaces = [{
network = var.vpc.self_link
subnetwork = var.subnet.self_link
nat = false
addresses = null
}]

boot_disk = {
image = "projects/windows-cloud/global/images/windows-server-2019-dc-v20221214"
type = "pd-balanced"
size = 70
}

create_template = true
}

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
}
}
}
}

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 }
]
}
}

health_check_configs = {
default = {
tcp = { port = 80 }
}
}
}
# tftest modules=3 resources=8
```

#### Storage Buckets

Expand Down