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

Perma diff in EC2 LaunchConfiguration userData causes replaces #4446

Closed
flostadler opened this issue Sep 9, 2024 · 4 comments · Fixed by #4450
Closed

Perma diff in EC2 LaunchConfiguration userData causes replaces #4446

flostadler opened this issue Sep 9, 2024 · 4 comments · Fixed by #4450
Assignees
Labels
awaiting/bridge The issue cannot be resolved without action in pulumi-terraform-bridge. impact/regression Something that used to work, but is now broken kind/bug Some behavior is incorrect or out of spec p1 A bug severe enough to be the next item assigned to an engineer resolution/fixed This issue was fixed

Comments

@flostadler
Copy link
Contributor

flostadler commented Sep 9, 2024

Describe what happened

Since version v6.51.0 the userData property of EC2 Launch Configurations shows a diff on every deployment.
The userData property is marked as ForceNew, so this causes replacements.
This can cause downtime, because this can cascade into ASG instances being replaced.

This does not reproduce under v6.50.1 of the provider. My suspicion is that this is caused by the rollout of PlanResourceChange as there were no changes to the LaunchConfiguration resource in the last 3 months (see).

Sample program

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as awsx from "@pulumi/awsx";

const amiId = pulumi.interpolate`/aws/service/eks/optimized-ami/1.30/amazon-linux-2023/x86_64/standard/recommended/image_id`.apply(name =>
    aws.ssm.getParameter({ name }, { async: true })
  ).apply(result => result.value);

const userData = `#!/bin/bash

/etc/eks/bootstrap.sh
`;

const nodeLaunchConfiguration = new aws.ec2.LaunchConfiguration("test",
    {
        associatePublicIpAddress: true,
        imageId: amiId,
        instanceType: "t2.medium",
        userData: userData,
    }
);

Log output

No response

Affected Resource(s)

aws:ec2:LaunchConfiguration

Output of pulumi about

n/a

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@flostadler flostadler added impact/regression Something that used to work, but is now broken kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team p1 A bug severe enough to be the next item assigned to an engineer and removed needs-triage Needs attention from the triage team labels Sep 9, 2024
@flostadler
Copy link
Contributor Author

This impacts EKS as well: pulumi/pulumi-eks#1345.

@flostadler
Copy link
Contributor Author

If you're running into this, you can downgrade to v6.50.1 of the AWS provider while we're working on fixing this

@flostadler flostadler changed the title EC2 LaunchConfiguration userData has perma diff Perma diff in EC2 LaunchConfiguration userData causes replaces Sep 9, 2024
@flostadler
Copy link
Contributor Author

I was able to pin-point it to this: pulumi/pulumi-terraform-bridge#2408

@flostadler flostadler self-assigned this Sep 10, 2024
@flostadler flostadler added the awaiting/bridge The issue cannot be resolved without action in pulumi-terraform-bridge. label Sep 10, 2024
@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Sep 11, 2024
@pulumi-bot
Copy link
Contributor

This issue has been addressed in PR #4450 and shipped in release v6.51.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting/bridge The issue cannot be resolved without action in pulumi-terraform-bridge. impact/regression Something that used to work, but is now broken kind/bug Some behavior is incorrect or out of spec p1 A bug severe enough to be the next item assigned to an engineer resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants