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

Allow protect to be set dynamically #525

Open
jamest-pin opened this issue Nov 15, 2023 · 0 comments
Open

Allow protect to be set dynamically #525

jamest-pin opened this issue Nov 15, 2023 · 0 comments
Labels
kind/enhancement Improvements or new features

Comments

@jamest-pin
Copy link

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

I want to set protect: dynamically. Something like this.

# Pulumi.develop.yaml
config:
  varProtectDBs: false

# Pulumi.production.yaml
config:
  varProtectDbs: true

# Pulumi.yaml
resources:
  myDBresource:
    options:
      protect: ${pulumi.stack}.${varProtectDBs}
    [...]

Why?
In dev environment, I don't care if some resources get destroyed or recreated. In other environments that may have data populated, such as UAT or Prod, I want to set them protected. Best practice is to set per environment values in the stack config file. I'm currently unable to do this because protect: appears to only accept a literal boolean, not an interpolated value. See
my comment and the following @Frassle 's comment in #453

Affected area/feature

@jamest-pin jamest-pin added kind/enhancement Improvements or new features needs-triage Needs attention from the triage team labels Nov 15, 2023
@justinvp justinvp removed the needs-triage Needs attention from the triage team label Nov 22, 2023
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

2 participants