Skip to content

Commit

Permalink
azurerm_express_route_circuit - add support for authorization_key (
Browse files Browse the repository at this point in the history
  • Loading branch information
mbfrahry authored Mar 23, 2023
1 parent 06a4863 commit 05707a8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 9 additions & 1 deletion internal/services/network/express_route_circuit_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@ func resourceExpressRouteCircuit() *pluginsdk.Resource {
Computed: true,
},

"authorization_key": {
Type: pluginsdk.TypeString,
Optional: true,
Sensitive: true,
},

"service_key": {
Type: pluginsdk.TypeString,
Computed: true,
Expand Down Expand Up @@ -217,7 +223,9 @@ func resourceExpressRouteCircuitCreateUpdate(d *pluginsdk.ResourceData, meta int
if !d.IsNewResource() {
erc.ExpressRouteCircuitPropertiesFormat.AllowClassicOperations = &allowRdfeOps
} else {
erc.ExpressRouteCircuitPropertiesFormat = &network.ExpressRouteCircuitPropertiesFormat{}
erc.ExpressRouteCircuitPropertiesFormat = &network.ExpressRouteCircuitPropertiesFormat{
AuthorizationKey: utils.String(d.Get("authorization_key").(string)),
}

// ServiceProviderProperties and expressRoutePorts/bandwidthInGbps properties are mutually exclusive
if _, ok := d.GetOk("express_route_port_id"); ok {
Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/express_route_circuit.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ The following arguments are supported:

~> **NOTE:** The `express_route_port_id` and the `bandwidth_in_gbps` should be set together and they conflict with `service_provider_name`, `peering_location` and `bandwidth_in_mbps`.

* `authorization_key` - (Optional) The authorization key. This can be used to set up an ExpressRoute Circuit with an ExpressRoute Port from another subscription.

* `tags` - (Optional) A mapping of tags to assign to the resource.

---
Expand Down

0 comments on commit 05707a8

Please sign in to comment.