title: How to set the value of a secret in GCP through CLI?
body: <p>I have script written in bash where I create a key with a certain name.</p>
  <pre><code>#!/bin/bash
  
  project_id=&quot;y&quot;
  secret_id=&quot;x&quot;
  secret_value=&quot;test&quot;
  gcloud config set project &quot;$project_id&quot;
  gcloud secrets create &quot;$secret_id&quot; --replication-policy=&quot;automatic&quot;
  </code></pre>
  <p>I want to be able to also directly add the secret-value to my secret, so that I do not have to go into my GCP account and set it manually (which would defeat the purpose). I have seen that it is possible to attach files through the following command, however there does not seem to be a similar command for a secret value.</p>
  <pre><code>--data-file=&quot;/path/to/file.txt&quot;
  </code></pre>