as i follow the example at https://www.digitalocean.com/community/tutorials/how-to-use-ansible-with-terraform-for-configuration-management
When I ran it terraform apply -var “do_token=${DO_PAT}” -var “pvt_key=/home/ubuntu/terraform-ansible/aws_rsa” -var “pub_key=~/.ssh/aws_rsa.pub”
I get an error
╷ │ Error: no ssh key found with name terraform │ │ with data.digitalocean_ssh_key.terraform, │ on provider.tf line 18, in data “digitalocean_ssh_key” “terraform”: │ 18: data “digitalocean_ssh_key” “terraform” { │ ╵
Not sure what I did wrong
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Hi there,
It looks like the SSH key is missing. You need to follow the steps from the prerequisites first and mainly this tutorial here which describes the steps that you need to take to configure your SSH keys:
https://www.digitalocean.com/community/tutorials/how-to-use-terraform-with-digitalocean
Hope that this helps! Best, Bobby