Difference between random_pet and random_id

Hi all,

Checking the Terraform documentation I’ve come across the random_pet and random_id resources, do they do the same thing, if not what is the difference?


Yes there are several resources provided by the “random” provider which basically do the same thing. The difference is around what random thing they produce. For example random_id produces a random string (with you being able to choose the length), while random_pet produces random strings consisting of multiple English words.

There are also resources to create random numbers, passwords, etc.

1 Like