<p>I am trying to create a kubernetes cluster with terraform but it shows me an error, I changed the value of the <strong>version</strong> on different occasions but it did not work.</p>
<pre><code>resource &quot;digitalocean_kubernetes_cluster&quot; &quot;lox&quot; {
  name    = &quot;lox&quot;
  region  = &quot;nyc1&quot;
  version = &quot;1.13.4-do.0&quot;

  node_pool {
    name       = &quot;worker-pool&quot;
    size       = &quot;s-1vcpu-2gb&quot;
    node_count = 2
  }
</code></pre>
<p>This is the error:</p>
<pre><code>Error: Error creating Kubernetes cluster: POST https://api.digitalocean.com/v2/kubernetes/clusters: 422 validation error: invalid version slug

  on 01-cluster.tf line 1, in resource &quot;digitalocean_kubernetes_cluster&quot; &quot;lox&quot;:
   1: resource &quot;digitalocean_kubernetes_cluster&quot; &quot;lox&quot; {
</code></pre>
<p>how can i solve it?</p>

<p>Use below command to grab the latest and valid version slug and use it in <code>version</code></p>
<pre><code>doctl kubernetes options versions
</code></pre>
