Skip to content

Commit 8ccde1a

Browse files
authored
Add random pet to work with providers (#5)
1 parent 998e566 commit 8ccde1a

File tree

4 files changed

+31
-1
lines changed

4 files changed

+31
-1
lines changed

.terraform.lock.hcl

+21
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

main.tf

+6
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,10 @@ terraform {
22

33
required_version = "~> 1.3"
44

5+
required_providers {
6+
random = {
7+
source = "hashicorp/random"
8+
version = "~> 3.4"
9+
}
10+
}
511
}

name.tf

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
resource "random_pet" "name" {
2+
separator = " "
3+
}

outputs.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
output "hello_world" {
22
description = "Testing output"
3-
value = "Hello World!"
3+
value = "Hello ${title(random_pet.name.id)}!"
44
}

0 commit comments

Comments
 (0)