-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #268
- Loading branch information
Showing
5 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
terraform import routeros_ip_cloud.test . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
resource "routeros_bridge_mlag" "mlag" { | ||
bridge = "bridge1" | ||
peer_port = "stack-link" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package routeros | ||
|
||
import ( | ||
"testing" | ||
) | ||
|
||
func TestAccInterfaceBridgeMlagTest_basic(t *testing.T) { | ||
t.Log("Test skipped, The test is skipped, the resource is only available on real hardware.") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package routeros | ||
|
||
import ( | ||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" | ||
) | ||
|
||
/* | ||
{ | ||
"bridge":"bridge1", | ||
"peer-port":"stack-link" | ||
} | ||
*/ | ||
|
||
// https://help.mikrotik.com/docs/display/ROS/Multi-chassis+Link+Aggregation+Group | ||
func ResourceInterfaceBridgeMlag() *schema.Resource { | ||
resSchema := map[string]*schema.Schema{ | ||
MetaResourcePath: PropResourcePath("/interface/bridge/mlag"), | ||
MetaId: PropId(Id), | ||
|
||
"bridge": { | ||
Type: schema.TypeString, | ||
Required: true, | ||
Description: "The bridge interface where MLAG is being created.", | ||
}, | ||
"peer_port": { | ||
Type: schema.TypeString, | ||
Required: true, | ||
Description: "An interface that will be used as a peer port. Both peer devices are using inter-chassis " + | ||
"communication over these peer ports to establish MLAG and update the host table. Peer port should be " + | ||
"isolated on a different untagged VLAN using a pvid setting. Peer port can be configured as a bonding " + | ||
"interface.", | ||
}, | ||
} | ||
|
||
return &schema.Resource{ | ||
CreateContext: DefaultSystemCreate(resSchema), | ||
ReadContext: DefaultSystemRead(resSchema), | ||
UpdateContext: DefaultSystemUpdate(resSchema), | ||
DeleteContext: DefaultSystemDelete(resSchema), | ||
|
||
Importer: &schema.ResourceImporter{ | ||
StateContext: schema.ImportStatePassthroughContext, | ||
}, | ||
|
||
Schema: resSchema, | ||
} | ||
} |