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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow config entries in Pulumi.<stack>.yaml without a namespace #8603

Open
tedchang77 opened this issue Dec 17, 2021 · 2 comments
Open

Allow config entries in Pulumi.<stack>.yaml without a namespace #8603

tedchang77 opened this issue Dec 17, 2021 · 2 comments
Labels
area/config pulumi config kind/enhancement Improvements or new features

Comments

@tedchang77
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

Configuration entries in Pulumi.stack.yaml require you to namespace all configurations. This is a challenge if you have to deploy the same application with a different project name, see #8537, as you need to modify the namespace for each configuration. you also end up duplicating the namespace text for many configurations, which can be repetitive and error prone.

Currently when you set configuration on the CLI or read configurations from the Config API you don't need to set the namespace in the configuration as it uses the project name defined in Pulumi.yaml file.

CLI:
pulumi config set key-with-no-namespace value

API:
let config = new pulumi.Config(); // namespace defaults to project name if its not set

can we also support inferring the namespace from the Pulumi.yaml project name if the namespace is not provided in the configuration key? so the configs in Pulumi.stack.yaml would look like this:

config:
  replicas: 1

instead of:

config:
  project-name:replicas: 1

Affected area/feature

pulumi CLI
pulumi Config API

@tedchang77 tedchang77 added the kind/enhancement Improvements or new features label Dec 17, 2021
@leezen leezen added the area/config pulumi config label Dec 18, 2021
@t0yv0
Copy link
Member

t0yv0 commented Jan 24, 2022

Related #2307

@antdking
Copy link

Additionally, comments + whitespace get stripped when it changes unprefixed to prefixed keys (ie, round-tripping #11456 is broken)

I'm not using it for DRY reasons, it just looks cleaner.

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

No branches or pull requests

4 participants