Open bschaatsbergen opened 10 months ago
Hey @bendbennett and @bflad, this should be ready for review, I really enjoyed working on this provider resource π
The only question I have is: we currently set the id
to -
, as there's no value to set the internal id with. What do you suggest?
@bschaatsbergen why not set the ID to the unique identifier of the generated IP address: the ip address itself.
@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 _randomip resource that you've added. Thanks.
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 _randomip 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.
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 random_ip
, please share over in the GH issue.
See https://github.com/hashicorp/terraform-provider-random/issues/517#issuecomment-2471737848
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
: