Thread
#aws
    s

    strong-helmet-83704

    1 month ago
    I’m confused about why Pulumi still tries to delete my VPC after i added
    retain_on_delete=True
    to the ResourceOptions. My understanding was that it would only remove it from the stack and not perform the API call to delete. What part of this flow am i misunderstanding?
    My best guess is… because i added the
    retain_on_delete=True
    flag to code AFTER my stack was already created, Pulumi has not had the opportunity to add this option to the stack/state for that resource…?
    I think if i perform a “pulumi up” after adding the option… it works as expected. But it’s not reported as an update to the stack/state… If I perform a destroy it will not read the the option from code.
    s

    square-ability-48831

    1 month ago
    yeah if i'm not mistaken you need to do a
    pulumi up
    to get the
    retain_on_delete
    to pulumi's state store - the
    pulumi up
    will not report any changes, but it will add the
    retain_on_delete
    attrib to the state file - if you're using the pulumi hosted state, check
    pulumi console
    before and after the no-op
    up
    s

    strong-helmet-83704

    1 month ago
    This fits with my understanding! Why is the state change not reported during the “up”?
    s

    square-ability-48831

    1 month ago
    because there's no change to AWS - just the state file. would be nice to see those reported too
    s

    strong-helmet-83704

    1 month ago
    I think any change being made to any state would be desirable to see…
    does a refresh do this?