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

Assets properties of resources are not exported #714

Open
julienp opened this issue Feb 9, 2025 · 0 comments
Open

Assets properties of resources are not exported #714

julienp opened this issue Feb 9, 2025 · 0 comments
Labels
kind/bug Some behavior is incorrect or out of spec

Comments

@julienp
Copy link
Contributor

julienp commented Feb 9, 2025

In the following YAML program file is empty, but fileVar is correctly exported.

name: yaml-bucket
runtime: yaml
variables:
  fileVar:
    fn::fileAsset: ./file.txt
resources:
  bucket:
    type: aws:s3:BucketV2
  textFile:
    type: aws:s3:BucketObjectv2
    properties:
      bucket: ${bucket.id}
      source:
        fn::fileAsset: ./file.txt
      key: file.txt
outputs:
  bucket: ${bucket.id}
  file: ${textFile.source}
  fileVar: ${fileVar}

Output:

Outputs:
    bucket : output<string>
    fileVar: asset(file:1c5b885) { ./file.txt }

In Python file is properly exported:

import pulumi
from pulumi_aws import s3

bucket = s3.BucketV2("my-bucket")
file = s3.BucketObjectv2(
    "file.txt", bucket=bucket.id, source=pulumi.FileAsset("./file.txt")
)

pulumi.export("bucket", bucket.id)
pulumi.export("file", file.source)
pulumi.export("fileVar", pulumi.FileAsset("./file.txt"))

Output:

Outputs:
    bucket : output<string>
    file   : {
        path: "./file.txt"
    }
    fileVar: {
        path: "./file.txt"
    }
@julienp julienp added the kind/bug Some behavior is incorrect or out of spec label Feb 9, 2025
@pulumi-bot pulumi-bot added the needs-triage Needs attention from the triage team label Feb 9, 2025
@lunaris lunaris removed the needs-triage Needs attention from the triage team label Feb 10, 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

3 participants