Lab: multiple providers Q5

it says Resources not configured correctly. and resources created succesfully
i created a file pet-name.tf under /root/terraform-projects/MPL

resource “local_file” “my_pet” {
filename = “/root/pet-name”
content = “My pet is called finnegan!!”

}
resource “random_pet” “other-pet” {
length = “1”
prefix = “Mr”
separator = “.”

}
this is the file then i opened it with integrated terminal
run the commands
terraform init
terraform plan
terraform apply
still it says resource not configured correctly i had same problem in previous lab
It would be great if you could provide lab solutions

Hi @shashwatshah101293

Can you please provide us the link to the lab ?

Regard

Hi @shashwatshah101293,

You made a mistake on the name local-file name he should be my-pet instead of my_pet. The correct tf file is below

resource "local_file" "my-pet" {
     filename = "/root/pet-name"
     content = "My pet is called finnegan!!"

}
resource "random_pet" "other-pet" {
     length = 1
     prefix = "Mr"
     separator = "."

}
1 Like