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

Problem with composite output properties #93

Open
ringods opened this issue Apr 9, 2024 · 0 comments
Open

Problem with composite output properties #93

ringods opened this issue Apr 9, 2024 · 0 comments

Comments

@ringods
Copy link
Member

ringods commented Apr 9, 2024

This issue is to communicate the roadblock I bumped into while trying to map output types to specific generated Pulumi SDK types.

In the TF provider, one can pass a composite output from the talos_machine_secrets resource further downstream:

resource "talos_machine_secrets" "this" {}

data "talos_machine_configuration" "controlplane" {
  cluster_name     = var.cluster_name
  cluster_endpoint = var.cluster_endpoint
  machine_type     = "controlplane"
  machine_secrets  = talos_machine_secrets.this.machine_secrets # <-- composite output passed here
}

In Pulumi, the generated output types for the properties of talos.machine.Secrets resource are different from the generated input types of e.g. the function talos.machine.getConfiguration. This results in that we can't immediately pass the property downstream, resulting in issues like #80.

I discussed this with a few of the Pulumi product engineers, only to conclude that it currently is not possible to fluently pass composite outputs immediately as inputs downstream, and this consistently in all of Pulumi's supported programming languages.

This is definitely a first case of resources returning a composite type, so I file a feature request for this: pulumi/pulumi#15883

In the meantime, I will investigate how to rework the Pulumi Talos Linux provider for the best user experience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant