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

Can't use Pulumi output values as args #1

Closed
seunggs opened this issue Oct 25, 2021 · 4 comments · Fixed by #2
Closed

Can't use Pulumi output values as args #1

seunggs opened this issue Oct 25, 2021 · 4 comments · Fixed by #2
Assignees
Labels
resolution/fixed This issue was fixed

Comments

@seunggs
Copy link

seunggs commented Oct 25, 2021

Hello!

  • 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)

Issue details

Errors out while creating the cert-manager resource with Pulumi output value as args:

error: Error: failed to register new resource cert-manager [kubernetes-cert-manager:index:CertManager]: 2 UNKNOWN: setting args: copying input "helmOptions": provider.CertManagerArgs.HelmOptions is typed as *helm.ReleaseType but must be a type that implements pulumi.Input or pulumi.Output for input with dependencies

Steps to reproduce

Creating the cert-manager resource using the below code:

const certManager = new certmanager.CertManager("cert-manager", {
      installCRDs: true,
      helmOptions: {
        namespace: certManagerNamespaceName,
        values: {
          serviceAccount: {
            annotations: {
              'eks.amazonaws.com/role-arn': certManagerRole.arn,
            }
          },
          securityContext: {
            fsGroup: 1001
          },
        }
      },
    }, { provider: k8sProvider })

Errors out due to the Pulumi output value certManagerRole.arn.

Also tried using serviceAccount and secuirtyContext args directly rather than inside helmOptions.values, but same error for all args.

Expected:
Ideally, should be able to create the resource with arg values of Pulumi outputs.

Actual:
Error creating resource

@viveklak viveklak self-assigned this Oct 29, 2021
@stack72 stack72 closed this as completed in #2 Nov 1, 2021
@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Nov 1, 2021
@seunggs
Copy link
Author

seunggs commented Nov 1, 2021

This is not fixed - still getting this error when I use a pulumi output value as input:

error: Error: failed to register new resource cert-manager [kubernetes-cert-manager:index:CertManager]: 2 UNKNOWN: setting args: copying input "serviceAccount": provider.CertManagerArgs.ServiceAccount is typed as *provider.CertManagerServiceAccount but must be a type that implements pulumi.Input or pulumi.Output for input with dependencies
        at Object.registerResource (/Users/seungchanlee/Documents/Sidetrek/sidetrek-webapp/node_modules/@pulumi/pulumi/runtime/resource.js:219:27)
        at new Resource (/Users/seungchanlee/Documents/Sidetrek/sidetrek-webapp/node_modules/@pulumi/pulumi/resource.js:217:24)
        at new ComponentResource (/Users/seungchanlee/Documents/Sidetrek/sidetrek-webapp/node_modules/@pulumi/pulumi/resource.js:389:9)
        at new CertManager (/Users/seungchanlee/Documents/Sidetrek/sidetrek-webapp/node_modules/@pulumi/certManager.ts:85:9)
        at new CertManager (/Users/seungchanlee/Documents/Sidetrek/sidetrek-webapp/pulumi/component_resources.ts:571:25)
        at new ClusterSvcStack (/Users/seungchanlee/Documents/Sidetrek/sidetrek-webapp/pulumi/stacks/cluster_svc.ts:80:25)
        at /Users/seungchanlee/Documents/Sidetrek/sidetrek-webapp/index.ts:70:29
        at Generator.next (<anonymous>)
        at /Users/seungchanlee/Documents/Sidetrek/sidetrek-webapp/index.ts:8:71
        at new Promise (<anonymous>)

Works fine when hardcoding a string value.

@viveklak viveklak reopened this Nov 20, 2021
@seunggs
Copy link
Author

seunggs commented Dec 22, 2021

Any update on this?

@pcuci
Copy link

pcuci commented Jan 13, 2022

Same issue :-)

Works fine when hardcoding a string value.

Confirming this workaround.

Though, I'd rather use the dynamically generated namespace name by Pulumi rather than a static name, so a fix here would be nice.

@EronWright
Copy link
Contributor

Seems like the issue was resolved, we simply need a new release of this provider to effectively use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants