You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add networking_resource_group variable for Azure module (#6)
Allow users to specify a separate resource group for existing VNet/subnet
lookups, enabling scenarios where networking and proxy resources live in
different resource groups. Defaults to resource_group when not set.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: terraform/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ The module supports two modes:
17
17
18
18
-**`bootstrap`** (default)
19
19
- Creates and configures an internal load balancer, a private endpoint service and the proxy compute.
20
-
- If networking (VPC/VNet & subnets) **are provided** along with `resource_group`, the module uses existing networking.
20
+
- If networking (VPC/VNet & subnets) **are provided** along with `resource_group` or `networking_resource_group` (Azure), the module uses existing networking. Use `networking_resource_group` when the VNet/subnet reside in a different resource group than the proxy resources.
21
21
- If networking is **not provided**, the module creates the necessary networking resources (including a new resource group if `resource_group` is `null`).
Copy file name to clipboardExpand all lines: terraform/azure/README.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,8 @@ module "dbx_proxy" {
24
24
25
25
# Azure config
26
26
location = "westeurope"
27
-
resource_group = "rg-dbx-proxy" # optional in bootstrap mode (required when using existing networking)
27
+
resource_group = "rg-dbx-proxy" # optional in bootstrap mode
28
+
# networking_resource_group = "rg-networking" # optional, defaults to resource_group. Set if VNet/subnet live in a different RG.
28
29
tags = {}
29
30
30
31
# dbx-proxy config
@@ -52,7 +53,8 @@ After apply, use the output `load_balancer.private_link_service_alias` when crea
52
53
| Variable | Type | Default | Description |
53
54
|---|---:|---:|---|
54
55
|`location`|`string`| (required) | Azure region to deploy to. |
55
-
|`resource_group`|`string`|`null`| Resource group name. Required when using existing networking (`vnet_name`/`subnet_name`) or in `proxy-only` mode. If `null` in `bootstrap`, a new one is created. |
56
+
|`resource_group`|`string`|`null`| Resource group name for proxy resources. Required in `proxy-only` mode. If `null` in `bootstrap`, a new one is created. |
57
+
|`networking_resource_group`|`string`|`null`| Resource group where the existing VNet/subnet reside. Defaults to `resource_group` if not set. Required (or `resource_group`) when using existing networking. |
56
58
|`vnet_name`|`string`|`null`| Existing VNet name. If `null` in `bootstrap`, a new VNet is created. |
57
59
|`subnet_name`|`string`|`null`| Existing subnet name. If empty in `bootstrap`, a new subnet is created. |
58
60
|`vnet_cidr`|`string`|`"10.0.0.0/16"`| VNet CIDR (only used when bootstrapping). |
@@ -94,6 +96,6 @@ Common variables are documented in `terraform/README.md`.
94
96
95
97
### Notes for Azure users
96
98
97
-
-`resource_group` is required when using existing networking (`vnet_name`/`subnet_name`), as it is used to look up the VNet and subnet. If `null` in `bootstrap` mode (without existing networking), a new one is created.
99
+
-When using existing networking (`vnet_name`/`subnet_name`), either `resource_group` or `networking_resource_group` must be set for the VNet/subnet lookup. Use `networking_resource_group` when the networking lives in a different resource group than the proxy resources. If `resource_group` is `null` in `bootstrap` mode, a new one is created for the proxy resources.
98
100
- Multi availability-zone resilience requires a zonal region and `min_capacity >= 2`; the VM scale set balances VMs over the available zones.
99
101
- In Azure a subnet spans multiple availability-zones, therefore a single subnet is sufficient. In `proxy-only` mode, you are responsible to provide a subnet. In `bootstrap` mode, a default subnet is created.
Copy file name to clipboardExpand all lines: terraform/azure/variables.tf
+11-5Lines changed: 11 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,13 @@ variable "location" {
11
11
12
12
variable"resource_group" {
13
13
type=string
14
-
description="Resource group name. Required when using existing networking (vnet_name/subnet_name) or in proxy-only mode. If null in bootstrap mode, a new resource group is created."
14
+
description="Resource group name for proxy resources. Required in proxy-only mode. If null in bootstrap mode, a new resource group is created."
15
+
default=null
16
+
}
17
+
18
+
variable"networking_resource_group" {
19
+
type=string
20
+
description="Resource group name where the existing VNet and subnet reside. Required when using existing networking (vnet_name/subnet_name) and the networking lives in a different resource group. Defaults to resource_group if not set."
15
21
default=null
16
22
}
17
23
@@ -51,16 +57,16 @@ variable "deployment_mode" {
51
57
}
52
58
53
59
variable"vnet_name" {
54
-
description="Name of existing VNet. If null in bootstrap mode, a new VNet is created. Requires resource_group to be set."
60
+
description="Name of existing VNet. If null in bootstrap mode, a new VNet is created. Requires resource_group or networking_resource_group to be set."
error_message="When vnet_name is set, resource_group or networking_resource_group must also be provided to look up the existing VNet and subnet."
64
70
}
65
71
}
66
72
@@ -71,7 +77,7 @@ variable "vnet_cidr" {
71
77
}
72
78
73
79
variable"subnet_name" {
74
-
description="Name of existing subnet. If null in bootstrap mode, a new subnet is created. Requires vnet_name and resource_group to be set."
80
+
description="Name of existing subnet. If null in bootstrap mode, a new subnet is created. Requires vnet_name and resource_group or networking_resource_group to be set."
0 commit comments