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

Conditional DeleteBeforeReplace in the schema. #2605

Open
rshade opened this issue Nov 8, 2024 · 3 comments
Open

Conditional DeleteBeforeReplace in the schema. #2605

rshade opened this issue Nov 8, 2024 · 3 comments
Labels
kind/enhancement Improvements or new features

Comments

@rshade
Copy link

rshade commented Nov 8, 2024

Hello!

  • Vote on this issue by adding a 👍 reaction
  • If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

For some bridged resources like google private eks clusters, certain fields trigger a replacement, but you will get a conflict if you don't delete before replace. To make it easier for users I would like to be able to trigger a deletebeforereplace based on those fields in the provider, and note it in the docs.

Field: {
    "enable_private_nodes": {
        DeleteBeforeReplace: true
    }
}

Docs:
"enablePrivateNodes" - "Whether nodes have internal IP addresses only."Triggers Replacement

Affected area/feature

@rshade rshade added kind/enhancement Improvements or new features needs-triage Needs attention from the triage team labels Nov 8, 2024
@VenelinMartinov
Copy link
Contributor

VenelinMartinov commented Nov 8, 2024

Hey @rshade, do these resources also need to be able to do ReplaceBeforeDelete?

Do only changes to enablePrivateNodes trigger a conflict? Other replacement causes don't trigger a conflict?

I am trying to understand why we can not have an unconditional DeleteBeforeReplace for this resource.

@t0yv0
Copy link
Member

t0yv0 commented Nov 8, 2024

pulumi/pulumi-gcp#2586 possibly this feature would allow to be more surgical about DBR instead of having to decide on a per-resource basis.

@VenelinMartinov
Copy link
Contributor

In pulumi/pulumi-gcp#2586 the clash is not caused by the resource itself - Compute Instances with the same configuration can exist simultaneously. The problem comes from attaching a secondary resource - these can not be attached to two primary resources at the same time, so DeleteBeforeReplace is needed only if the attachment is there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements or new features
Projects
None yet
Development

No branches or pull requests

3 participants