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

Feature Request: Account for PendingModifiedValues for RDS instances #5067

Open
sfc-gh-jlangefeld opened this issue Jan 9, 2025 · 2 comments
Labels
awaiting-feedback Blocked on input from the author customer/feedback Feedback from customers kind/enhancement Improvements or new features needs-repro Needs repro steps before it can be triaged or fixed service/rds

Comments

@sfc-gh-jlangefeld
Copy link

sfc-gh-jlangefeld commented Jan 9, 2025

With have RDS instances that have maintenance windows once a week.
We don't use Pulumi deployments, but rather our own deployment, that periodically checks for drifts across a wide range of infrastructure (not just RDS instances) using pulumi previews.

This combination gets us into the following predicament: When we make a change in config to an RDS instance outside a maintenance window, AWS accepts that change request and stores it in PendingModifiedValues. Here an example for updating the EngineVersion (output of aws rds describe-db-instances --db-instance-identifier <instance-id>):

            "PendingModifiedValues": {
                "EngineVersion": "16.3"
            },
            "EngineVersion": "12.19",

The aws console displays this as the following:
Image

The pulumi up to set the EngineVersion to 16.3 goes through successfully without error. But then the next pulumi preview before the maintenance window opening sees a diff again, because it only compares that EngineVersion field and doesn't look at PendingModifiedValues to see that this desired change was already applied, but just didn't go through yet due to the maintenance window that's not currently active.

I think ideally the diff comparison in the pulumi preview could also look at the PendingModifiedValues and don't report a diff if the desired change is already captured there.

This often blocks our hands-off automation as we get reports that a desired change couldn't be achieved.

My question is specific to RDS instances but I could imagine also other resources have maintenance windows with the same behavior.

@pulumi-bot pulumi-bot added the needs-triage Needs attention from the triage team label Jan 9, 2025
@automagic automagic added the customer/feedback Feedback from customers label Jan 9, 2025
@t0yv0
Copy link
Member

t0yv0 commented Jan 10, 2025

Thank you for this suggestion @sfc-gh-jlangefeld !

At a quick glance Terraform provider is handling PendingModifiedValues.EngineVersion specially:

https://github.com/hashicorp/terraform-provider-aws/blob/ec6555ce8d44ce5661811b3877f10fe9e379bccd/internal/service/rds/instance.go#L2705

It would be interesting to see if pulumi up --refresh behaves as expected in your scenario.

One difference between Pulumi and Terraform is that Terraform refreshes by default during terraform apply and Pulumi does not. Refreshing makes the engine aware of drift - any out of band changes that may have been done to the cloud. This difference may be pertinent here.

If pulumi up --refresh does not work possibly there is a bug or something is missing. If you have concrete Pulumi code with a minimal repro it could help us investigate further.

@t0yv0 t0yv0 added awaiting-feedback Blocked on input from the author needs-repro Needs repro steps before it can be triaged or fixed kind/enhancement Improvements or new features and removed needs-triage Needs attention from the triage team labels Jan 10, 2025
@sfc-gh-jlangefeld
Copy link
Author

Thanks for your reply! I was under the impression that we run pulumi refresh for all our infrastructure, but just noticed that it wasn't enabled for AWS. This is worth a try and we'll report back if that doesn't work.

@pulumi-bot pulumi-bot added needs-triage Needs attention from the triage team and removed awaiting-feedback Blocked on input from the author labels Jan 16, 2025
@t0yv0 t0yv0 added awaiting-feedback Blocked on input from the author and removed needs-triage Needs attention from the triage team labels Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-feedback Blocked on input from the author customer/feedback Feedback from customers kind/enhancement Improvements or new features needs-repro Needs repro steps before it can be triaged or fixed service/rds
Projects
None yet
Development

No branches or pull requests

4 participants