pulumi: S3 Bucket(s) in broken state
Today I started receiving the error:
preparing urn:pulumi:dev::pulumi-test::aws:s3/bucket:Bucket::web-assets-bucket's old property state: expected string or JSON map; got <nil>
This initially happened on a large existing project, but I am able to quickly replicate the issue by attempting to import one of the problem buckets in a fresh AWS+Typescript project slightly modified from the template.
Full contents of my simple project index.ts:
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as awsx from "@pulumi/awsx";
// Create an AWS resource (S3 Bucket)
// const bucket = new aws.s3.Bucket("my-bucket");
// const bucket = aws.s3.Bucket.get('web-assets-bucket','irisvr-dev-web-assets')
const bucket = new aws.s3.Bucket('web-assets-bucket', {
bucket: 'irisvr-dev-web-assets'
}, {
import:'irisvr-dev-web-assets'
})
// Export the name of the bucket
export const bucketName = bucket.id;
I can successfully ‘get’ the bucket by commenting that section and commenting the ‘new’, but importing immediately throws the error at the top of this issue.
Attached is the output of TF_LOG=TRACE pulumi up --logtostderr -v=9 2> out.txt
out.txt
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 17 (8 by maintainers)
For the record I’ve been fine with v2.2 as well - I think I initially downgraded to v2.1 because that’s what I’d been using just before breakage.