Skip to content

Commit

Permalink
Update gateway reference, acceptance test, and docs for routing_proto…
Browse files Browse the repository at this point in the history
…cols resource
  • Loading branch information
thogarty committed Nov 11, 2023
1 parent 5a4feaa commit b8d1189
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/resources/equinix_fabric_routing_protocols.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ page_title: "equinix_fabric_routing_protocols Resource - terraform-provider-equi
subcategory: "Fabric"
description: |-
Fabric V4 API compatible resource allows creation and management of Equinix Fabric routing protocols
~> Note Equinix Fabric v4 resources and datasources are currently in Beta. The interfaces related to equinix_fabric_ resources and datasources may change ahead of general availability. Please, do not hesitate to report any problems that you experience by opening a new issue https://github.com/equinix/terraform-provider-equinix/issues/new?template=bug.md
~> Note Equinix Fabric v4 resources and datasources are currently in Beta. The interfaces related to equinix_fabric_ resources and datasources may change ahead of general availability. Please, do not hesitate to report any problems that you experience by opening a new issue https://github.com/equinix/terraform-provider-equinix/issues/new?assignees=&labels=bug&projects=&template=bug.yml&title=%5BBug%5D%3A+equinix_fabric_routing_protocols
---

# equinix_fabric_routing_protocols (Resource)
Expand Down
3 changes: 0 additions & 3 deletions equinix/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@ func setMap(d *schema.ResourceData, m map[string]interface{}) error {
if f, ok := v.(setFn); ok {
err = f(d, key)
} else {
if key == "router" {
err = d.Set("gateway", v)
}
err = d.Set(key, v)
}

Expand Down
1 change: 1 addition & 0 deletions equinix/fabric_mapping_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,7 @@ func accessPointToTerra(accessPoint *v4.AccessPoint) *schema.Set {
}
if accessPoint.Router != nil {
mappedAccessPoint["router"] = CloudRouterToTerra(accessPoint.Router)
mappedAccessPoint["gateway"] = CloudRouterToTerra(accessPoint.Router)
}
if accessPoint.LinkProtocol != nil {
mappedAccessPoint["link_protocol"] = linkedProtocolToTerra(*accessPoint.LinkProtocol)
Expand Down
3 changes: 3 additions & 0 deletions equinix/resource_fabric_routing_protocols_acc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ func TestAccFabricCreateRoutingProtocols(t *testing.T) {
}),
),
ExpectNonEmptyPlan: true,
ImportStateId: "<connection_uuid>/<direct_uuid>/<bgp_uuid>",
ImportState: true,
ImportStateVerify: true,
},
},
})
Expand Down

0 comments on commit b8d1189

Please sign in to comment.