title: How to call a variable of string with spaces in a terraform provisioner?
body: <p>I am trying to run terraform provisioner which is calling my ansible playbook , now I am passing public key as a variable from user . When passing public key it doesnt take the entire key and just ssh-rsa , but not a complete string. 
  I want to pass the complete string as "ssh-rsa Aghdgdhfghjfdh"</p>
  
  <p>The provisioner in terraform which I am running is :</p>
  
  <pre><code>resource "null_resource" "bastion_user_provisioner" {
    provisioner "local-exec" {
      command = "sleep 30 &amp;&amp; ansible-playbook ../../../../ansible/create-user.yml --private-key ${path.module}/${var.project_name}.pem -vvv -u ubuntu -e 'username=${var.username}' -e 'user_key=${var.user_key}' -i ${var.bastion_public_ip}, -e 'root_shell=/bin/rbash' -e 'raw_password=${random_string.bastion_password.result}'"
    }
  }
  </code></pre>
  
  <p>If i run playbook alone as:</p>
  
  <pre><code>ansible-playbook -i localhost create-user.yml --user=ubuntu --private-key=kkk000.pem -e "username=kkkkk" -e 'user_key='ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC+GWlljlLzW6DOEo"' -e root_shell="/bin/bash"
  </code></pre>
  
  <p>it works,
  But I want the string to be in a terraform variable which is passed in provisioner.</p>
  
  <p>I want to have key copied to a file as </p>
  
  <pre><code>ssh-rsa AWRDkj;jfdljdfldkf'sd.......
  </code></pre>
  
  <p>and not just</p>
  
  <pre><code>ssh-rsa
  </code></pre>