Answers: <p>It depends on your proivder stansa,</p>
  <pre><code>provider &quot;openstack&quot; {
    # stuff
  }
  </code></pre>
  <p>It should look something like the above. If it has,</p>
  <ul>
  <li><a href="https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs#auth_url" rel="nofollow noreferrer"><code>auth_url</code></a> defined, then it also will very likely have <code>application_credential_name</code> and <code>application_credential_secret</code> defined.</li>
  <li><a href="https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs#cloud" rel="nofollow noreferrer"><code>cloud</code></a> defined, then it's looking for your OpenStack <code>clouds.yaml</code>. (Note this is distinct from <code>cloud.cfg</code>) Your <code>clouds.yaml</code>
  <ul>
  <li>is documented in <a href="https://docs.openstack.org/openstacksdk/latest/user/config/configuration.html" rel="nofollow noreferrer">OpenStack</a></li>
  <li>can be exported from Horizons, the web interface,</li>
  <li>typically resides in <code>$HOME/.config/openstack</code>, and applies for the user. But can also be in the local directory, or installed globally in <code>/etc/openstack</code>.</li>
  </ul>
  </li>
  <li>Has neither <code>auth_url</code> nor <code>cloud</code>, in which case Terraform will try to authenticate with environmental variables which are <a href="https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs#cloud" rel="nofollow noreferrer">documented here</a></li>
  </ul>
  
Answers: CC BY-SA 4.0
Answers: 2023-01-27T19:10:59.430Z
Answers: 2023-01-27T19:10:59.430Z
Answers: Evan Carroll
Body: <p>I want to use some company terraform files. They all rely on authentication to OpenStack which is the resource they're provisioning from. How can I configure this?</p>
  
Tags: <terraform><openstack><authentication>
Title: How can I configure OpenStack authentication for Terraform?
UserDisplayName: Evan Carroll
ThreadText: # How can I configure OpenStack authentication for Terraform?
  
  (Asked by: username_0 on 2023-01-27)
  
  I want to use some company terraform files. They all rely on authentication to OpenStack which is the resource they're provisioning from. How can I configure this?
  
  **Tags:** terraform, openstack, authentication
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2023-01-27. Score: 0 | Accepted answer
  
  It depends on your proivder stansa,
  
  ```
  provider "openstack" {
    # stuff
  }
  
  ```
  
  It should look something like the above. If it has,
  
  * [`auth_url`](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs#auth_url) defined, then it also will very likely have `application_credential_name` and `application_credential_secret` defined.
  * [`cloud`](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs#cloud) defined, then it's looking for your OpenStack `clouds.yaml`. (Note this is distinct from `cloud.cfg`) Your `clouds.yaml`
    + is documented in [OpenStack](https://docs.openstack.org/openstacksdk/latest/user/config/configuration.html)
    + can be exported from Horizons, the web interface,
    + typically resides in `$HOME/.config/openstack`, and applies for the user. But can also be in the local directory, or installed globally in `/etc/openstack`.
  * Has neither `auth_url` nor `cloud`, in which case Terraform will try to authenticate with environmental variables which are [documented here](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs#cloud)
  
  
  ---
  
  