Skip to content

Commit

Permalink
docs: Warning of use, BGP examples
Browse files Browse the repository at this point in the history
  • Loading branch information
vaerh committed May 12, 2023
1 parent 3874d90 commit 8da5703
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 3 deletions.
3 changes: 3 additions & 0 deletions examples/resources/routeros_bgp_connection/import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#The ID can be found via API or the terminal
#The command for the terminal is -> :put [/routing/bgp/connection get [print show-ids]]
terraform import routeros_bgp_connection.test *3
13 changes: 13 additions & 0 deletions examples/resources/routeros_bgp_connection/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
resource "routeros_bgp_connection" "test" {
name = "neighbor-test"
as = "65550/5"
as_override = true
add_path_out = "none"
remote {
address = "172.17.0.1"
as = "12345/5"
}
local {
role = "ebgp"
}
}
3 changes: 3 additions & 0 deletions examples/resources/routeros_bgp_template/import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#The ID can be found via API or the terminal
#The command for the terminal is -> :put [/routing/bgp/template get [print show-ids]]
terraform import routeros_bgp_template.test *3
14 changes: 14 additions & 0 deletions examples/resources/routeros_bgp_template/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
resource "routeros_bgp_template" "test" {
name = "test-template"
as = 65521
input {
limit_process_routes_ipv4 = 5
limit_process_routes_ipv6 = 5
}
output {
affinity = "alone"
keep_sent_attributes = true
default_originate = "never"
}
// save_to = "bgp.dump"
}
2 changes: 1 addition & 1 deletion routeros/resource_bgp_connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ func ResourceBGPConnection() *schema.Resource {
}

return &schema.Resource{
Description: "Using this resource you may happen unexpected behavior, for example, some of the attributes " +
Description: "> [!WARNING] Using this resource you may happen unexpected behavior, for example, some of the attributes " +
"may not be removable after adding them to the TF configuration. Please report this to GitHub and it " +
"may be possible to fix it. Use the resource at your own risk as it is!",
CreateContext: DefaultCreate(resSchema),
Expand Down
2 changes: 1 addition & 1 deletion routeros/resource_bgp_connection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ resource "routeros_bgp_connection" "test" {
local {
role = "ebgp"
}
}
}
`
}
2 changes: 1 addition & 1 deletion routeros/resource_bgp_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ func ResourceBGPTemplate() *schema.Resource {
}

return &schema.Resource{
Description: "Using this resource you may happen unexpected behavior, for example, some of the attributes " +
Description: "> [!WARNING] Using this resource you may happen unexpected behavior, for example, some of the attributes " +
"may not be removable after adding them to the TF configuration. Please report this to GitHub and it " +
"may be possible to fix it. Use the resource at your own risk as it is!",
CreateContext: DefaultCreate(resSchema),
Expand Down

0 comments on commit 8da5703

Please sign in to comment.