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

Feature request: support old devices #521

Closed
aleofreddi opened this issue Aug 8, 2023 · 1 comment · Fixed by #527
Closed

Feature request: support old devices #521

aleofreddi opened this issue Aug 8, 2023 · 1 comment · Fixed by #527
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@aleofreddi
Copy link

aleofreddi commented Aug 8, 2023

Description

I was trying to use the terraform-provider-junos with a bunch of EOL'd EX2200 switches running JunOS 12 (which I guess are common for homelabs, as they can be found on eBay for a low price) - in general it worked well, but some configurations didn't apply as they changed with later versions of JunOS (physical interface's native-vlan-id and port-mode). Follows an example of produced configuration (with fixes):

ge-0/0/11 {
    description test-trunk;
    ##
    ## Warning: statement ignored: unsupported platform (ex2200-c-12p-2g)
    ## Warning: native-vlan-id can be specified with flexible-vlan-tagging mode or with interface-mode trunk
    ##
    native-vlan-id 506;
    unit 0 {
        family ethernet-switching {
            port-mode trunk; #<<< In JunOS 12, interface-mode is known as port-mode.
            ##
            ## Warning: statement ignored: unsupported platform (ex2200-c-12p-2g)
            ##
            interface-mode trunk;
            vlan {
                members [ ... ];
            }
            native-vlan-id 506; #<<< This is the right place for native-vlan-id in JunOS 12
        }
    }
}

This feature request is to add support for JunOS 12 and have the provider produce the right configuration according to the device version.

New or Affected Resource(s)

  • junos_interface_physical

Potential Terraform Configuration

No configuration changes.

References

If there's interest, I can help and put together a PR for this.

@aleofreddi aleofreddi added the enhancement New feature or request label Aug 8, 2023
@jeremmfr
Copy link
Owner

It seems that switches without ELS use the same parameters.
I will take care of adding additional arguments to cover these cases even if I won't be able to test them.

I prefer to declare additional arguments and let users choose (for example with the data source ´junos_system_information’) instead of trying to detect the right syntax to use and potentially making the wrong choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants