Skip to content

Dynamic value for build argument or secret always triggers an update #678

@saadismail

Description

@saadismail

Hi, thank you for this package, seems a massive improvement coming from pulumi-docker package.

Similar to pulumi/pulumi-docker#539 (comment), I am using AWS Code Artifact to store my application dependencies:

  1. my docker images need AWS CodeArtifact credentials to download libraries
  2. the credentials are passed as build argument for the purpose of downloading the libraries
  3. credentials are temporary so next CI run uses different credentials
  4. this always triggers an "update" because "build context" is different between the old state and the new state: https://github.com/pulumi/pulumi-docker/blob/master/provider/provider.go#L295-L295

I have skimmed some code and this seem like an intentional "feature" as secret/arg might change and it would be better to rebuild the image for 99.99+% cases - but I have that remaining 0.01% case :D

How would you suggest to avoid the unnecessary rebuilds in this case?

I think it would be worthwhile to allow users to add an exclusion list for arg/secret (ideally both) and then similar to how registry credentials update do not trigger an update, we can do the same for user-defined exclusions.

I can help with the above change if that makes sense. P.S. This will be my first Pulumi contribution so might need some pointers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions