<p>I created a ConfigMap with Pulumi:</p>
<pre><code>    // Create setup script
    const argoCDInitialSetupScript = new k8s.core.v1.ConfigMap('argo-cd-setup', {
      metadata: {
        name: 'argo-cd-setup',
        namespace: 'argo',
      },
      data: {
        'init-argo.sh': fs.readFileSync(&quot;src/assets/yaml/argo-cd/argo-cd-setup.sh&quot;).toString()
      },
    });
</code></pre>
<p>Next, I run a Job that will use this ConfigMap and when the Job completes, I want to delete this ConfigMap but I cannot find how to do so in Pulumi!</p>
<p>I would have expected something like this:</p>
<pre><code>    // Delete Config Map
    argoCDInitialSetupScript.delete();
</code></pre>

LucasBrazi06
<p>With Pulumi once the job is done, you can simply run the command to destroy.</p>
<pre><code>$ pulumi destroy
 
</code></pre>
<p>Refer to <a href="https://www.pulumi.com/registry/packages/kubernetes/how-to-guides/configmap-rollout/" rel="nofollow noreferrer">link</a> for more information.</p>
