<p>I've declared a kubernetes secret in pulumi like:</p>

<pre class="lang-js prettyprint-override"><code>const tlsSecret = new k8s.core.v1.Secret('tlsSecret', {
  metadata: {
    name: 'star.builds.qwil.co'
  },
  data: {
    'tls.crt': tlsCert,
    'tls.key': tlsKey
  }
});
</code></pre>

<p>However, I'm finding that when the secret is created only <code>tls.key</code> is present in the secret. When I look at the Diff View from the pulumi deployment on app.pulumi.com I see the following:</p>

<pre><code>tlsSecret (kubernetes:core:Secret)
+  kubernetes:core/v1:Secret (create)
    [urn=urn:pulumi:local::ledger::kubernetes:core/v1:Secret::tlsSecret]
    apiVersion: "v1"
    data      : {
        tls.key: "[secret]"
    }
    kind      : "Secret"
    metadata  : {
        labels: {
            app.kubernetes.io/managed-by: "pulumi"
        }
        name  : "star.builds.qwil.co"
    }
</code></pre>

<p>Why is only <code>tls.key</code> being picked up even though I've also specified a <code>tls.crt</code>?</p>

Paymahn Moghadasian
<p>Turns out the variable <code>tlsCert</code> was false-y (I was loading it from config with the wrong key for <code>Config.get()</code>). Pulumi was smart and didn't create a secret with an empty string.</p>
