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

Add EnablePrivateLinkFastPath to the Express Route Connection resource #25596

Merged
merged 11 commits into from
Apr 16, 2024
11 changes: 11 additions & 0 deletions internal/services/network/express_route_connection_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ func resourceExpressRouteConnection() *pluginsdk.Resource {
Optional: true,
},

"enable_private_link_fast_path": {
fjaeckel marked this conversation as resolved.
Show resolved Hide resolved
Type: pluginsdk.TypeBool,
Optional: true,
Default: false,
},

"express_route_gateway_bypass_enabled": {
Type: pluginsdk.TypeBool,
Optional: true,
Expand Down Expand Up @@ -180,6 +186,7 @@ func resourceExpressRouteConnectionCreate(d *pluginsdk.ResourceData, meta interf
ID: utils.String(d.Get("express_route_circuit_peering_id").(string)),
},
EnableInternetSecurity: utils.Bool(d.Get("enable_internet_security").(bool)),
EnablePrivateLinkFastPath: utils.Bool(d.Get("enable_private_link_fast_path").(bool)),
RoutingConfiguration: expandExpressRouteConnectionRouting(d.Get("routing").([]interface{})),
RoutingWeight: utils.Int32(int32(d.Get("routing_weight").(int))),
ExpressRouteGatewayBypass: utils.Bool(d.Get("express_route_gateway_bypass_enabled").(bool)),
Expand Down Expand Up @@ -231,6 +238,10 @@ func resourceExpressRouteConnectionRead(d *pluginsdk.ResourceData, meta interfac
d.Set("authorization_key", props.AuthorizationKey)
d.Set("enable_internet_security", props.EnableInternetSecurity)

if props.EnablePrivateLinkFastPath != nil {
d.Set("enable_private_link_fast_path", props.EnablePrivateLinkFastPath)
}
fjaeckel marked this conversation as resolved.
Show resolved Hide resolved

if props.ExpressRouteGatewayBypass != nil {
d.Set("express_route_gateway_bypass_enabled", props.ExpressRouteGatewayBypass)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ resource "azurerm_express_route_connection" "test" {
routing_weight = 2
authorization_key = "90f8db47-e25b-4b65-a68b-7743ced2a16b"
enable_internet_security = true
enable_private_link_fast_path = true
fjaeckel marked this conversation as resolved.
Show resolved Hide resolved
express_route_gateway_bypass_enabled = true

routing {
Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/express_route_connection.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ The following arguments are supported:

* `enable_internet_security` - (Optional) Is Internet security enabled for this Express Route Connection?

* `enable_private_link_fast_path` - (Optional) Bypass the ExpressRoute gateway when accessing private-links. ExpressRoute FastPath (`express_route_gateway_bypass_enabled`) must be enabled.
fjaeckel marked this conversation as resolved.
Show resolved Hide resolved

* `express_route_gateway_bypass_enabled` - (Optional) Specified whether Fast Path is enabled for Virtual Wan Firewall Hub. Defaults to `false`.

* `routing` - (Optional) A `routing` block as defined below.
Expand Down
Loading