What's the code your using to create the s3 object?
echoing-dinner-19531
10/24/2022, 10:18 AM
And is this using aws or aws-native, I think it's the provider itself that does the zipping not the engine so we need to look at the correct one.
i
icy-controller-6092
10/24/2022, 10:42 PM
Hi Fraser, a more complete example. When I download
outer.zip
from the S3 bucket and unzip its contents,
inner.zip
is a directory and not a zip archive
Copy code
import * as aws from '@pulumi/aws'
import * as pulumi from '@pulumi/pulumi'
new aws.s3.BucketObject({
bucket: 'xyz',
key: 'outer.zip',
source: new pulumi.asset.AssetArchive({
'my.txt': new pulumi.asset.StringAsset('test'),
'inner.zip': new pulumi.asset.FileArchive('dist/folder'),
})
})
e
echoing-dinner-19531
10/25/2022, 9:00 AM
OK I can look into this
echoing-dinner-19531
10/25/2022, 9:07 AM
Looks like this is by design, inner archives get flattened out into their files in parent archives. I suspect a lot of things probably rely on that behaviour so we probably can't flip it around, but if you raise an issue at github.com/pulumi/pulumi/issues we can discuss what could be done to support this.
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.