Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pulumi transform on helm chart + unknown Output<string> @ preview => wrong type for value; expected string; got interface {} #3464

Open
awoimbee opened this issue Jan 28, 2025 · 1 comment
Assignees
Labels
kind/bug Some behavior is incorrect or out of spec

Comments

@awoimbee
Copy link

What happened?

I have a transform on a helm chart, to simplify things I made it always return {props, opts}, it causes issues at preview time.

Example

  const chart = new helm.ChartV4("brek", {
    chart: "oauth2-proxy",
    version: "7.9.0",
    repositoryOpts: {
      repo: "https://oauth2-proxy.github.io/manifests"
    },
    namespace: "default",
    values: {
      config: {
        clientID: "none",
        clientSecret: new RandomPassword("pass", { length: 8 }).result
      }
    }
  }, { provider, transforms: [({ props, opts }) => ({ props, opts })] });

Leads to

    error: kubernetes:helm.sh/v4:Chart resource 'brek' has a problem: template: oauth2-proxy/templates/secret.yaml:16:4: executing "oauth2-proxy/templates/secret.yaml" at <include "oauth2-proxy.secrets" .>: error calling include: template: oauth2-proxy/templates/_helpers.tpl:159:29: executing "oauth2-proxy.secrets" at <.Values.config.clientSecret>: wrong type for value; expected string; got interface {}

(here's the line in oauth2proxy's _helpers.tpl)

Without the transform or if the transform returns undefined, everything works.

Output of pulumi about

nope

29 │ '@pulumi/kubernetes':
30 │ specifier: ^4.19.0
31 │ version: 4.21.0([email protected])
38 │ '@pulumi/pulumi':
39 │ specifier: ^3.145.0

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@awoimbee awoimbee added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Jan 28, 2025
@rquitales
Copy link
Member

Thanks for reporting this issue and apologies that you're facing it. On the surface, this may appear to be a bug at the SDK level, rather than a bug in the Kubernetes provider. I'll investigate further and report back. Thanks for providing detailed repro steps on this.

@rquitales rquitales self-assigned this Jan 30, 2025
@rquitales rquitales removed the needs-triage Needs attention from the triage team label Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

2 participants