https://pulumi.com logo
#general
Title
# general
b

busy-umbrella-36067

12/05/2019, 9:22 PM
m

microscopic-florist-22719

12/05/2019, 9:30 PM
Can you provide some details about your Pulumi program? e.g. which resource types are you using
b

busy-umbrella-36067

12/05/2019, 9:32 PM
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

microscopic-florist-22719

12/05/2019, 9:43 PM
Thanks. I suspect this is related to the
lifecycleRules
; I'll take a look.
b

busy-umbrella-36067

12/05/2019, 11:19 PM
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

microscopic-florist-22719

12/05/2019, 11:59 PM
I suspect that's because the old stacks' resources reference older versions of the AWS provider
b

busy-umbrella-36067

12/06/2019, 4:40 PM
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

microscopic-florist-22719

12/06/2019, 6:21 PM
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

kind-mechanic-53546

12/11/2019, 3:26 AM
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

microscopic-florist-22719

12/11/2019, 4:38 AM
I checked in a fix for that issue yesterday, but it hasn’t yet been released. We’re hoping to do so tomorrow.
2 Views