Is there a way to get a fixed Secret name from Pul...
# kubernetes
s
Is there a way to get a fixed Secret name from Pulumi rather than a name with a hash value appended to the end of the name I specify?
Copy code
const dockerSecret = new Secret('docker-hub-credentials',
  {
    data: {
      'username': docker_username, // Base64-encoded value
      'password': docker_password  // Base64-encoded value
    }
  },
  {
    provider: k3sProvider
  }
)
In the above example, the secret created is docker-hub-credentials-m4vtegxw. In other, non-Pulumi programs, I have to remember to update the referenced secret name to the full Pulumi-generated name value. I’d expected to be able to set a name property that would be analogous to setting a
name
property on an S3 Bucket to fix the name.
b
set it like so:
Copy code
const dockerSecret = new Secret('docker-hub-credentials',
  {
    metadata: {
       name: "docker-hub-credentials"
    },
    data: {
      'username': docker_username, // Base64-encoded value
      'password': docker_password  // Base64-encoded value
    }
  },
  {
    provider: k3sProvider
  }
)