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 support for ICCP protocol #583

Merged
merged 2 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changes/issue-573.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<!-- markdownlint-disable-file MD013 MD041 -->
FEATURES:

* add `junos_iccp` resource (Partial fix [#573](https://github.com/jeremmfr/terraform-provider-junos/issues/573))
* add `junos_iccp_peer` resource (Partial fix [#573](https://github.com/jeremmfr/terraform-provider-junos/issues/573))
47 changes: 47 additions & 0 deletions docs/resources/iccp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
page_title: "Junos: junos_iccp"
---

# junos_iccp

-> **Note:** This resource should only be created **once**.
It's used to configure static (not object) options in `protocols iccp` block.

Configure static configuration in `protocols iccp` block.

## Example Usage

```hcl
# Configure protocol ICCP
resource "junos_iccp" "iccp" {
local_ip_addr = "192.0.2.1"
authentication_key = "a_key"
session_establishment_hold_time = 300
}
```

## Argument Reference

The following arguments are supported:

- **local_ip_addr** (Required, String)
Local IP address to use by default for all peers.
- **authentication_key** (Optional, String, Sensitive)
MD5 authentication key for all peers.
- **session_establishment_hold_time** (Optional, Number)
Time within which connection must succeed with peers (45..600 seconds).

## Attributes Reference

The following attributes are exported:

- **id** (String)
An identifier for the resource with value `iccp`.

## Import

Junos protocols ICCP can be imported using any id, e.g.

```shell
$ terraform import junos_iccp.iccp random
```
69 changes: 69 additions & 0 deletions docs/resources/iccp_peer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
page_title: "Junos: junos_iccp_peer"
---

# junos_iccp_peer

Provides an ICCP peer resource.

## Example Usage

```hcl
# Add an ICCP peer
resource "junos_iccp_peer" "peer1" {
ip_address = "192.0.2.1"
}
```

## Argument Reference

The following arguments are supported:

- **ip_address** (Required, String)
IP address for this peer.
- **liveness_detection** (Required, Block)
Bidirectional Forwarding Detection options for the peer.
- **detection_time_threshold** (Optional, Number)
High detection-time triggering a trap (milliseconds).
- **minimum_interval** (Optional, Number)
Minimum transmit and receive interval (1..255000 milliseconds).
- **minimum_receive_interval** (Optional, Number)
Minimum receive interval (1..255000 milliseconds).
- **multiplier** (Optional, Number)
Detection time multiplier (1..255).
- **no_adaptation** (Optional, Boolean)
Disable adaptation.
- **transmit_interval_minimum_interval** (Optional, Number)
Minimum transmit interval (1..255000 milliseconds).
- **transmit_interval_threshold** (Optional, Number)
High transmit interval triggering a trap (milliseconds).
- **version** (Optional, String)
BFD protocol version number.
Need to be `0`, `1` or `automatic`.
- **redundancy_group_id_list** (Required, Set of Number)
List of redundancy groups this peer is part of.
- **authentication_key** (Optional, String, Sensitive)
MD5 authentication key.
- **backup_liveness_detection** (Optional, Block)
Backup liveness detection.
- **backup_peer_ip** (Optional, String)
Backup liveness detection peer's IP address.
- **local_ip_addr** (Optional, String)
Local IP address to use for this peer alone.
- **session_establishment_hold_time** (Optional, Number)
Time within which connection must succeed with this peer (45..600 seconds).

## Attributes Reference

The following attributes are exported:

- **id** (String)
An identifier for the resource with format `<ip_address>`.

## Import

Junos ICCP peer can be imported using an id made up of `<ip_address>`, e.g.

```shell
$ terraform import junos_iccp_peer.peer1 192.0.2.1
```
2 changes: 2 additions & 0 deletions internal/providerfwk/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ func (p *junosProvider) Resources(_ context.Context) []func() resource.Resource
newForwardingoptionsSamplingResource,
newForwardingoptionsSamplingInstanceResource,
newGenerateRouteResource,
newIccpResource,
newIccpPeerResource,
newInterfaceLogicalResource,
newInterfacePhysicalDisableResource,
newInterfacePhysicalResource,
Expand Down
Loading
Loading