https://pulumi.com logo
#kubernetes
Title
# kubernetes
s

sparse-apartment-71989

03/28/2022, 11:45 PM
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

billowy-army-68599

03/28/2022, 11:50 PM
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
  }
)
11 Views