Answers: <h1>No</h1>
  <p>Having just done tested the <code>remote-exec</code> provisioner it does not..</p>
  <pre><code>$ curl http://169.254.169.254/latest/meta-data/
  ami-id
  ami-launch-index
  ami-manifest-path
  block-device-mapping/
  hostname
  instance-action
  instance-id
  instance-type
  local-hostname
  local-ipv4
  placement/
  public-hostname
  public-ipv4
  public-keys/
  reservation-id
  </code></pre>
  
Answers: CC BY-SA 4.0
Answers: 2023-02-07T02:36:28.257Z
Answers: 2023-02-07T17:52:50.607Z
Answers: 2023-02-07T17:52:50.607Z
Answers: Evan Carroll
Body: <p>I have a Terraform HCL file with a <a href="https://developer.hashicorp.com/terraform/language/resources/provisioners/remote-exec" rel="nofollow noreferrer"><code>remote-exec</code> provisioner</a> that looks like this..</p>
  <pre><code>resource &quot;openstack_compute_instance_v2&quot; &quot;sandboxvm&quot; {
    provisioner &quot;remote-exec&quot; {
      inline = [&lt;&lt;EOF
        echo &quot;start of sandboxvm provision...&quot;
      EOF
      ]
    }
  }
  </code></pre>
  <p>I <strong>know</strong> <code>user-data</code> gets stored on the <a href="https://devops.stackexchange.com/q/17376/18965">OpenStack metadata server</a>. I learned that the hard way when <a href="https://devops.stackexchange.com/a/15683/18965">I wrote this answer</a>. Does the OpenStack metadata server have access to the script used by this provisioner?</p>
  
Tags: <terraform><openstack>
Title: Does OpenStack meta data carry the remote-exec provisioner stanza?
UserDisplayName: Evan Carroll
ThreadText: # Does OpenStack meta data carry the remote-exec provisioner stanza?
  
  (Asked by: username_0 on 2023-02-07)
  
  I have a Terraform HCL file with a [`remote-exec` provisioner](https://developer.hashicorp.com/terraform/language/resources/provisioners/remote-exec) that looks like this..
  
  ```
  resource "openstack_compute_instance_v2" "sandboxvm" {
    provisioner "remote-exec" {
      inline = [<<EOF
        echo "start of sandboxvm provision..."
      EOF
      ]
    }
  }
  
  ```
  
  I **know** `user-data` gets stored on the [OpenStack metadata server](https://devops.stackexchange.com/q/17376/18965). I learned that the hard way when [I wrote this answer](https://devops.stackexchange.com/a/15683/18965). Does the OpenStack metadata server have access to the script used by this provisioner?
  
  **Tags:** terraform, openstack
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2023-02-07. Score: 0 | Accepted answer
  
  # No
  
  Having just done tested the `remote-exec` provisioner it does not..
  
  ```
  $ curl http://169.254.169.254/latest/meta-data/
  ami-id
  ami-launch-index
  ami-manifest-path
  block-device-mapping/
  hostname
  instance-action
  instance-id
  instance-type
  local-hostname
  local-ipv4
  placement/
  public-hostname
  public-ipv4
  public-keys/
  reservation-id
  
  ```
  
  
  ---
  
  