github.com/khulnasoft-lab/defsec@v1.0.5-0.20230827010352-5e9f46893d95/rules/cloud/policies/digitalocean/compute/use_ssh_keys.tf.go (about) 1 package compute 2 3 var terraformUseSshKeysGoodExamples = []string{ 4 ` 5 data "digitalocean_ssh_key" "terraform" { 6 name = "myKey" 7 } 8 9 resource "digitalocean_droplet" "good_example" { 10 image = "ubuntu-18-04-x64" 11 name = "web-1" 12 region = "nyc2" 13 size = "s-1vcpu-1gb" 14 ssh_keys = [ data.digitalocean_ssh_key.myKey.id ] 15 } 16 `, 17 } 18 19 var terraformUseSshKeysBadExamples = []string{ 20 ` 21 resource "digitalocean_droplet" "good_example" { 22 image = "ubuntu-18-04-x64" 23 name = "web-1" 24 region = "nyc2" 25 size = "s-1vcpu-1gb" 26 } 27 `, 28 } 29 30 var terraformUseSshKeysLinks = []string{ 31 `https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/droplet#ssh_keys`, 32 } 33 34 var terraformUseSshKeysRemediationMarkdown = ``