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

routeros_snmp_community Addresses Doesn't Accept Multiple Addresses #495

Closed
johnelliott opened this issue Jun 17, 2024 · 1 comment · Fixed by #498
Closed

routeros_snmp_community Addresses Doesn't Accept Multiple Addresses #495

johnelliott opened this issue Jun 17, 2024 · 1 comment · Fixed by #498
Labels
bug Something isn't working released

Comments

@johnelliott
Copy link
Contributor

johnelliott commented Jun 17, 2024

Describe the bug
routeros_snmp_community addresses doesn't allow multiple address.

To Reproduce

resource "routeros_snmp_community" "mything" {
  addresses = "10.0.1.12,10.10.0.129"
  name      = "mything"
}

Fails validation

Expected behavior

resource "routeros_snmp_community" "mything" {
  addresses = ["10.0.1.12", "10.10.0.129"]
  name      = "mything"
}

Should yeild

Terraform will perform the following actions:

  # routeros_snmp_community.mything will be updated in-place
  ~ resource "routeros_snmp_community" "mything" {
      ~ addresses               = [
          - "10.0.1.12/32",
          + "10.0.1.12",
          + "10.10.0.129",
        ]
        id                      = "*1"
        name                    = "mything"
        # (7 unchanged attributes hidden)
    }

Debug Information

Stack Trace

Additional context

Thanks so much for all this work. I would like to submit a patch but I'm a newbie to Terraform and provider development, see below.

ROS v7.15: I went to do an SNMP community setup and realized the config with comma-separated ips in cidr notation doesn't work e.g. "1.1.1.1,8.8.8.8" or "1.1.1.1/8,8.8.8.8/32" doesn't work. It seems like it's accepting a string, which is fine, but because it's using the ip address validator, the comma-separated list fails.

I did manage to set up a basic dev environment and tried to steal some of the snmp-trap schema that uses a list of addresses into the address part of the routeros_snmp_community definition and a full test with hardware did work, but I wasn't able to figure out how to address the Default value and didn't see any default values with lists or sets in the project.

Anyway, I'd love to contribute but may need a little help on-boarding.

@johnelliott johnelliott added the bug Something isn't working label Jun 17, 2024
johnelliott added a commit to johnelliott/terraform-provider-routeros that referenced this issue Jun 22, 2024
johnelliott added a commit to johnelliott/terraform-provider-routeros that referenced this issue Jun 22, 2024
@vaerh vaerh closed this as completed in bcf417f Jun 27, 2024
@vaerh
Copy link
Collaborator

vaerh commented Jun 27, 2024

🎉 This issue has been resolved in version 1.54.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants