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

Missing support for Secret in Pulumi Deployment environment variables #376

Closed
aureq opened this issue Aug 14, 2024 · 1 comment
Closed
Assignees
Labels
customer/feedback Feedback from customers kind/enhancement Improvements or new features
Milestone

Comments

@aureq
Copy link
Member

aureq commented Aug 14, 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

It's possible to configure the deployment settings for a given stack and inject plain text environment variables ✔.
However, the input type is Mapping[str, str] and it doesn't make any distinctions on the value being a string or a Pulumi secret ❌. Both are treated as plain text values.

This mean, if a user/customer needs to provide a token (say, accessing a remote service), then the value shows up in plain text in the Pulumi Cloud Console ❌.

Here is a screen capture after running the code below

Image

Source code for the screen short above

import pulumi
import pulumi_pulumiservice as pulumiservice

deployment_settings = pulumiservice.DeploymentSettings(
    resource_name = "deployment-settings",
    organization = pulumi.get_organization(),
    project = pulumi.get_project(),
    stack = pulumi.get_stack(),
    source_context = pulumiservice.DeploymentSettingsSourceContextArgs(
        git = pulumiservice.DeploymentSettingsGitSourceArgs(
            branch = "main",
            repo_url = "aureq/aws-py-eks-helm",
            git_auth = pulumiservice.DeploymentSettingsGitSourceGitAuthArgs(
                basic_auth = pulumiservice.DeploymentSettingsGitAuthBasicAuthArgs(
                    username = "aureq",
                    password = "<redacted>"
                )
            )
        )
    ),
    operation_context = pulumiservice.DeploymentSettingsOperationContextArgs(
        environment_variables = {
            "SECRET_ENV_VAR": pulumi.Output.secret('This should NOT be visible')
        }
    )
)
@aureq aureq added customer/feedback Feedback from customers kind/enhancement Improvements or new features needs-triage Needs attention from the triage team labels Aug 14, 2024
@cleverguy25 cleverguy25 added this to the 0.109 milestone Aug 14, 2024
@cleverguy25 cleverguy25 removed the needs-triage Needs attention from the triage team label Aug 14, 2024
@IaroslavTitov
Copy link
Contributor

Thank you for finding and bringing this up!
Fixed and released a new version, please update to 0.23.2 and secrets will work in Deployment Settings again.

@IaroslavTitov IaroslavTitov modified the milestones: 0.109, 0.108 Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer/feedback Feedback from customers kind/enhancement Improvements or new features
Projects
None yet
Development

No branches or pull requests

3 participants