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

Size limitation on number of ips in myjfrog_ip_allowlist? #17

Open
nbaju1 opened this issue Oct 4, 2024 · 7 comments
Open

Size limitation on number of ips in myjfrog_ip_allowlist? #17

nbaju1 opened this issue Oct 4, 2024 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@nbaju1
Copy link

nbaju1 commented Oct 4, 2024

Describe the bug
Attempting to add ~3800 ips to existing allow list, with ~1000 ips, fails on apply with the following error:

╷
│ Error: failed to add IPs
│ 
│   with myjfrog_ip_allowlist.ip-allowlist,
│   on cdk.tf.json line 4189, in resource.myjfrog_ip_allowlist.ip-allowlist:
│ 4189:       }
│ 
│  - 
╵

I'm using the CDK to generate the resources, so no code to show. Plan output works without issues.

Terraform version 1.8.4
Provider version 1.0.0

Expected behavior
Append the new ips to the allow list.

@nbaju1 nbaju1 added the bug Something isn't working label Oct 4, 2024
@alexhung
Copy link
Member

alexhung commented Oct 4, 2024

@nbaju1 Thanks for the report. I'll add validation to this attribute.

@alexhung
Copy link
Member

alexhung commented Oct 8, 2024

@nbaju1 Per the limitations from the MyJFrog REST API documentation: https://jfrog.com/help/r/jfrog-rest-apis/get-platform-cloud-nat-ips, the combined CIDR list allows maximum of 2500 entries.

So you will likely encounter this issue before getting close to 2500 as you probably have other CIDRs already in your AWS environment.

@alexhung
Copy link
Member

alexhung commented Oct 8, 2024

@nbaju1 Does the attribute contains all ~3800 ips? Or do you have ~3800 resource configurations, each with one ip? I'm trying to ascertain the actual failure, whether you are hitting the ips/cidr limits, or other failure (e.g. timeout/retry) from the REST API.

@nbaju1
Copy link
Author

nbaju1 commented Oct 9, 2024

@alexhung One resource with all the ips.

@alexhung
Copy link
Member

alexhung commented Oct 9, 2024

@nbaju1 In this case, even with a size validation on the ips attribute (2500) this error may still happens for you.

You can confirm this is an issue with the MyJFrog API by using the Add IP to Allowlist API directly. If error occurs, you should contact your JFrog customer support contact to open a support ticket.

@nbaju1
Copy link
Author

nbaju1 commented Oct 10, 2024

I converted the list of ips into the smallest set of CIDR blocks possible which resulted in ~2800 CIDRs, which I was able to deploy. So the 2500 limit doesn't seem to be a hard limit.

@alexhung
Copy link
Member

@nbaju1 Interesting. Looks like this is a MyJFrog API behavior.

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

No branches or pull requests

2 participants