kreuzwerker / terraform-provider-docker

Terraform Docker provider
Mozilla Public License 2.0
570 stars 187 forks source link

feat: Add support for build-secrets #604

Open emanuel-skrenkovic opened 4 months ago

emanuel-skrenkovic commented 4 months ago

Enables passing of build-secrets through the 'secrets' block inside 'build'. The feature is only available when using Buildkit.

I don't have much knowledge as to how build secrets work, but I tried to follow how buildx does it and implement it here. This feature is something that pops up as a need often at my job.

If changes need to be made, I will try to accommodate. :)

Tested by installing the provider locally, pushing the secrets into files in the Dockerfile, and verifying that the values were passed through.