By acdbrn1960
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!
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.