79240976

Date: 2024-12-01 05:44:58
Score: 2
Natty:
Report link

this was actually a major frustration of mine with building Docker-based assets in cdk... Injecting tokens into my build seems very important to me and I was surprised that there was no elegant support for it.

The way to solve this is to create a CodeBuild project and use a Provider and CustomResource to trigger it at deployment time.

I've actually built a pretty neat solution that I've used with great success in my own personal projects: https://constructs.dev/packages/token-injectable-docker-builder

You can check it out here: https://medium.com/p/3914fc08ca1e. It's called the TokenInjectableDockerBuilder, and it's open source. If you want to dig through the code itself, you can check it out here: https://github.com/AlexTech314/TokenInjectableDockerBuilder/blob/main/src/index.ts.

Reasons:
  • Blacklisted phrase (0.5): medium.com
  • Blacklisted phrase (0.5): check it out
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Alex Stepansky