b
m
Can you provide some details about your Pulumi program? e.g. which resource types are you using
b
We're using this function to create S3 buckets.
Copy code
export function createS3Bucket(
    name: string,
    expireDays: number,
    opts: pulumi.ComponentResourceOptions
): aws.s3.Bucket {
    // expire old backups
    let bucket = new aws.s3.Bucket(
        name,
        {
            lifecycleRules: [
                {
                    enabled: true,
                    expiration: {
                        days: expireDays
                    }
                }
            ],
            forceDestroy: true
        },
        opts
    )

    return bucket
}
Here's another snippet
Copy code
if (!this.args.isTest) {
                    s3Bucket = new pulumiAWS.s3.Bucket(
                        'ripple',
                        {
                            lifecycleRules: [
                                {
                                    enabled: true,
                                    expiration: {
                                        days: 7
                                    }
                                }
                            ],
                            forceDestroy: true
                        },
                        { parent: this }
                    )
m
Thanks. I suspect this is related to the
lifecycleRules
; I'll take a look.
b
removing the lifecycle policy from the code didn't resolve the issue, I think its related to the provider thats in state
I'm only seeing this on a new stack I stood up, old stacks seem to run fine with the exact same code
m
I suspect that's because the old stacks' resources reference older versions of the AWS provider
b
Any luck with this? We’re blocked on a prod rollout, I can create an issue if needed.
Actually, it seems to have resolved itself now 🤷‍♂️
m
I couldn't get this to repro locally after a number of tries. I'm glad to hear that it's resolved itself, but if you wouldn't mind filing an issue to track, that would be helpful.
k
I'm getting the same thing, somewhat intermittently Added
lifecycleRules
block to existing stack => Failed to deploy => Commented out
lifecycleRules
block => failed to deploy => destroyed stack ok => deployed stack ok => Uncommented
lifecycleRules
block => deployed ok => added output =>
panic: interface conversion: interface {} is nil, not map[string]interface {}
Whew, that's a lot, was there a bug logged for this?
m
I checked in a fix for that issue yesterday, but it hasn’t yet been released. We’re hoping to do so tomorrow.