Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- Add `flooding_suppression_address_resolution_disable` attribute to `iosxe_evpn` resource and data source
- Add `iosxe_evpn_ethernet_segment` resource and data source for managing L2VPN EVPN Ethernet Segment configuration
- Add `evpn_ethernet_segments` attribute to `iosxe_interface_ethernet` and `iosxe_interface_port_channel` resources and data sources
- Add `iosxe_interface_igmp` resource and data source for managing IGMP configuration on interfaces

## 0.9.3

Expand Down
37 changes: 37 additions & 0 deletions docs/data-sources/interface_igmp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "iosxe_interface_igmp Data Source - terraform-provider-iosxe"
subcategory: "Multicast"
description: |-
This data source can read the Interface IGMP configuration.
---

# iosxe_interface_igmp (Data Source)

This data source can read the Interface IGMP configuration.

## Example Usage

```terraform
data "iosxe_interface_igmp" "example" {
type = "Loopback"
name = "100"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `name` (String)
- `type` (String) Interface type

### Optional

- `device` (String) A device name from the provider configuration.

### Read-Only

- `id` (String) The path of the retrieved object.
- `version` (Number) IGMP version
1 change: 1 addition & 0 deletions docs/guides/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ description: |-
- Add `flooding_suppression_address_resolution_disable` attribute to `iosxe_evpn` resource and data source
- Add `iosxe_evpn_ethernet_segment` resource and data source for managing L2VPN EVPN Ethernet Segment configuration
- Add `evpn_ethernet_segments` attribute to `iosxe_interface_ethernet` and `iosxe_interface_port_channel` resources and data sources
- Add `iosxe_interface_igmp` resource and data source for managing IGMP configuration on interfaces

## 0.9.3

Expand Down
51 changes: 51 additions & 0 deletions docs/resources/interface_igmp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "iosxe_interface_igmp Resource - terraform-provider-iosxe"
subcategory: "Multicast"
description: |-
This resource can manage the Interface IGMP configuration.
---

# iosxe_interface_igmp (Resource)

This resource can manage the Interface IGMP configuration.

## Example Usage

```terraform
resource "iosxe_interface_igmp" "example" {
type = "Loopback"
name = "100"
version = 3
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `name` (String)
- `type` (String) Interface type
- Choices: `FastEthernet`, `GigabitEthernet`, `TwoGigabitEthernet`, `FiveGigabitEthernet`, `TenGigabitEthernet`, `TwentyFiveGigE`, `FortyGigabitEthernet`, `HundredGigE`, `AppGigabitEthernet`, `Loopback`, `Vlan`, `Port-channel`, `Port-channel-subinterface/Port-channel`, `Tunnel`, `Virtual-Template`, `VirtualPortGroup`, `Vif`, `Multilink`, `Cellular`, `BDI`

### Optional

- `device` (String) A device name from the provider configuration.
- `version` (Number) IGMP version
- Range: `1`-`3`
- Default value: `2`

### Read-Only

- `id` (String) The path of the object.

## Import

Import is supported using the following syntax:

The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:

```shell
terraform import iosxe_interface_igmp.example "<type>,<name>"
```
4 changes: 4 additions & 0 deletions examples/data-sources/iosxe_interface_igmp/data-source.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
data "iosxe_interface_igmp" "example" {
type = "Loopback"
name = "100"
}
1 change: 1 addition & 0 deletions examples/resources/iosxe_interface_igmp/import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
terraform import iosxe_interface_igmp.example "<type>,<name>"
5 changes: 5 additions & 0 deletions examples/resources/iosxe_interface_igmp/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
resource "iosxe_interface_igmp" "example" {
type = "Loopback"
name = "100"
version = 3
}
46 changes: 46 additions & 0 deletions gen/definitions/interface_igmp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
name: Interface IGMP
path: Cisco-IOS-XE-native:native/interface/%s=%v/ip/Cisco-IOS-XE-igmp:igmp
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we expect a lot more attributes to be added here in the future? Otherwise it might not be worth creating a new resource and instead just add the version attribute to the existing iosxe_interface_* resources and data sources.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say that yes, there's quite a few more interface-specific IGMP attributes that could be added in the future. Judging by the CLI options alone:

Switch(config)#interface Looopback0
Switch(config-if)#ip igmp ?
  access-group                IGMP group access group
  explicit-tracking           Enable/Disable IGMP explicit-tracking
  helper-address              IGMP helper address
  iif-starg                   IGMP update incoming interface field of starg
  immediate-leave             Leave groups immediately without sending last member query, use for one host network only
  join-group                  IGMP join multicast group
  last-member-query-count     IGMP last member query count
  last-member-query-interval  IGMP last member query interval
  limit                       IGMP limit
  mroute-proxy                Mroute to IGMP proxy
  proxy-report-interval       IGMP proxy report interval
  proxy-service               Enable IGMP mroute proxy service
  querier-timeout             IGMP previous querier timeout
  query-interval              IGMP host query interval
  query-max-response-time     IGMP max query response value
  static-group                IGMP static multicast group
  tcn                         IGMP TCN configuration
  unidirectional-link         IGMP unidirectional link multicast routing
  upstream-proxy              IGMP upstream IGMP proxy
  v3-query-max-response-time  IGMP v3 max query response value
  v3lite                      Enable/disable IGMPv3 Lite
  version                     IGMP version

In my opinion deriving from experience, there's quite a few of these options that are relatively popular and would likely be implemented into the provider eventually.

augment_path: Cisco-IOS-XE-native:native/interface/GigabitEthernet=%v/ip/Cisco-IOS-XE-igmp:igmp
no_delete: true
doc_category: Multicast
attributes:
- yang_name: type
tf_name: type
description: Interface type
type: String
reference: true
enum_values:
- FastEthernet
- GigabitEthernet
- TwoGigabitEthernet
- FiveGigabitEthernet
- TenGigabitEthernet
- TwentyFiveGigE
- FortyGigabitEthernet
- HundredGigE
- AppGigabitEthernet
- Loopback
- Vlan
- Port-channel
- Port-channel-subinterface/Port-channel
- Tunnel
- Virtual-Template
- VirtualPortGroup
- Vif
- Multilink
- Cellular
- BDI
example: Loopback
- yang_name: name
example: 100
- yang_name: version
description: IGMP version
default_value: 2
example: 3

test_prerequisites:
- path: Cisco-IOS-XE-native:native/interface/Loopback=100
attributes:
- name: name
value: 100
136 changes: 136 additions & 0 deletions internal/provider/data_source_iosxe_interface_igmp.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

83 changes: 83 additions & 0 deletions internal/provider/data_source_iosxe_interface_igmp_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading