-
Notifications
You must be signed in to change notification settings - Fork 118
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
feat: implement random_ip
resource
#519
base: main
Are you sure you want to change the base?
feat: implement random_ip
resource
#519
Conversation
3a03f2d
to
0665205
Compare
…al to the byte length network address (in byte form).
Hey @bendbennett and @bflad, this should be ready for review, I really enjoyed working on this provider resource 😊 |
@bschaatsbergen why not set the ID to the unique identifier of the generated IP address: the ip address itself. |
Hmm, I'm just not entirely sure if it might conflict with how Terraform Core deals with internal IDs containing special characters. I'll check it out – thanks for bringing it up, @mvanholsteijn! |
Hi @bschaatsbergen 👋 Thank you for submitting this PR. As the random provider is widely used across the community, we'd like to leave this open to assess the level of community interest before making a decision regarding the addition of the new random_ip resource that you've added. Thanks. |
Thanks for getting back to me @bendbennett, appreciate it. Agreed, lets see :) |
This looks really helpful, and that would have helped me tremendously today. |
chore: reference the right example tfconfig
4b66768
to
582f62e
Compare
Thank you for your comments on this pull request, @kaspergrubbe! Please remember to 👍🏼 the PR or issue #517 to help bring it to the team’s attention. |
Following up on what @bschaatsbergen said, if you think this would be useful and have a good use-case for See #517 (comment) |
Closes #517
The
random_ip
resource generates a random IP address, either IPv4 or IPv6. By default, it randomly chooses between 0.0.0.0/0 (IPv4) and ::/0 (IPv6). You can influence the IP type by specifying acidr_range
.Example usage
Basic:
IPv4:
IPv6:
Using a count:
Using a count followed by a distinct:
Output from
make testacc
: