Skip to content

Is it possible to export the same result twice under different names? #9408

Discussion options

You must be logged in to vote

Good question! This feels to me like it might be a bug. This works:

...
b = "some-string"
pulumi.export("export3", b)
pulumi.export("export4", b)
...
Outputs:
    export1: [secret]
  + export3: "some-string"
  + export4: "some-string"

As does running both outputs though apply:

...
pulumi.export("export1", a.result.apply(lambda result: result))
pulumi.export("export2", a.result.apply(lambda result: result))
...
Outputs:
    export1: [secret]
  + export2: [secret]

The equivalent program in TypeScript seems to work as well:

import * as random from "@pulumi/random";

const a = new random.RandomPassword("A", {
    length: 32,
});

export const export1 = a.result;
export const export2 = a.result;

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@f11r
Comment options

@cnunciato
Comment options

Answer selected by f11r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants