codefresh-io / terraform-provider-codefresh

Terraform provider for the Codefresh API
https://registry.terraform.io/providers/codefresh-io/codefresh
Mozilla Public License 2.0
18 stars 24 forks source link

New Datasource: IP Ranges #82

Open userbradley opened 2 years ago

userbradley commented 2 years ago

Howdy!

Cloudflare has what I'm looking for from you guys, basically a datasource I can use that just spits out a list of IP address' you're currently using

It's not too complex from the looks of it, just a call to the text file list, and then expose it as a List.

Link to cloudflare Implementation - this should be less painful now that there is a text file specifically with these IP's Resolved here

Let me know!

korenyoni commented 1 year ago

Neat idea, but I'm just wondering if that list can be relied on as a source of truth. Ideally it would be some API endpoint that spits out those IPv4 addresses, which we don't have AFAIK.

userbradley commented 1 year ago

Hmm, I think the API endpoint implementation is simple, on GCP at least it's just a case of calling the compute API for IP address with the tag 'public_use'

Have a look here too, someone did something pretty similar for bitbucket

link

apologies for formatting, on the mobile app

korenyoni commented 1 year ago

@userbradley

Ah, yes you were referring to this text file: https://codefresh.io/docs/docs/administration/cf-ip4.txt

Not as pretty as the endpoint https://ip-ranges.atlassian.com/ in the BitBucket provider above. But okay, yes. I'll try and get this into the 0.1.0 release we have planned.

userbradley commented 1 year ago

You ledge! Thanks!!