-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Draft: Add Public IPv4 Pools data source #28203
Draft: Add Public IPv4 Pools data source #28203
Conversation
Community NoteVoting for Prioritization
For Submitters
|
This reverts commit 016659a.
Sorry, created a small gitastrophe trying to rebase. |
Honestly not worth it to fix this branch, I'm just going to kill it & start a new one. Sorry for being a doofus with git! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Description
Presently, there are some gaps in coverage relating to IPv4 Pools. #17425 raises the following user story (among others):
This gap impacted my org as well (and I have seen several random users on various sites requesting this particular feature), which is why I am submitting this PR, in part-fulfillment of the needs of #17425.
This PR therefore adds the following items:
aws_vpc_public_ipv4_pools
A substantial question in my mind when I was writing this code was: does it go too far for a data source? Most data sources that can read & provide data on a range of resources only include, as output:
This is obviously going a step further in providing structured output according to the DescribePublicIpv4Pools API method. I would appreciate any feedback on whether or not that is, categorically, too much output to include in a Data Source. But on the other hand, users (including myself) have need of a method that simply takes one or more IPv4 pool IDs and returns information about those pools. This is how I chose to implement that, but I am open to requests for changes.
A further question I have for reviewers would be: Have I correctly inferred the error type for my Finder in
internal/service/ec2/find.go:1234
? I could not find much in the way of documentation about writing Finders in general.Finally: I am working on acceptance testing, and this has Draft status until I get tests passing. However, due to the nature of this particular resource, it is quite difficult to run Acceptance Tests; we would need to be able to provision a BYOIP pool of public IPs (and this is kinda cost-prohibitive, as well as requiring a manual step to sign and attach a CIDR Authorization Context to the IPAM pool in order to create an IPAM pool CIDR. Any input on how to test this in the existing framework...I am open to your thoughts.
I should note here that all existing tests for BYOIP AND all IPAM variations simply skip any kind of AccTest for public IPv4 addresses, for obvious reasons. There's really nothing I can see in the existing framework to to pattern this approach off of, and I'm struggling to think how we would do this--apart from, e.g., spoofing the existence of public IPv4 pools in the tfstate.
Relations
Relates #17425
Output from Acceptance Testing