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

aws.rds.Instance finalSnapshotIdentifier attribute should be required when skipFinalSnapshot is not given. #2196

Open
lech-r opened this issue Oct 28, 2022 · 1 comment
Labels
awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). kind/bug Some behavior is incorrect or out of spec

Comments

@lech-r
Copy link

lech-r commented Oct 28, 2022

What happened?

One of the recent pulumi/aws updates (somewhere between 4.0.0 and 5.18.0) has reversed the skip_final_snapshot implicit default. It is now false if not defined explicitly. At the same time, finalSnapshotIdentifier is not a required input for aws.rds.Instance resource.
You are setting people up for trouble with this. Creating aws.rds.Instance resource with minimum required inputs results in skipFinalSnapshot: false and empty finalSnapshotIdentifier attribute. Try to destroy or replace such DB, and Pulumi barks final_snapshot_identifier is required when skip_final_snapshot is false. Fair enough, except it should be required at DB creation time, and is not.

Steps to reproduce

Create aws.rds.Instance resource with minimum required inputs - do not provide skipFinalSnapshot or finalSnapshotIdentifier inputs. Then, pulumi destroy, or make any change that triggers instance replacement.

Expected Behavior

finalSnapshotIdentifier attribute should be required at DB creation time if skipFinalSnapshot is not given.

Actual Behavior

Creating aws.rds.Instance resource with minimum required inputs results in skipFinalSnapshot: false and empty finalSnapshotIdentifier attribute. Destruction then fails with final_snapshot_identifier is required when skip_final_snapshot is false error.

Output of pulumi about

CLI
Version 3.44.0
Go Version go1.19.2
Go Compiler gc

Plugins
NAME VERSION
aws 5.18.0
aws 4.37.5
docker 3.1.0
docker 3.1.0
nodejs unknown
postgresql 3.3.0

Host
OS ubuntu
Version 20.04
Arch x86_64

This project is written in nodejs: executable='/snap/bin/node' version='v16.18.0

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).

@lech-r lech-r added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Oct 28, 2022
@viveklak viveklak added the awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). label Nov 1, 2022
@viveklak
Copy link
Contributor

viveklak commented Nov 1, 2022

Thanks for opening the issue. I am afraid this behavior is inherited from the terraform provider: hashicorp/terraform-provider-aws#4910.

@viveklak viveklak removed the needs-triage Needs attention from the triage team label Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

2 participants