terraform-github-actions icon indicating copy to clipboard operation
terraform-github-actions copied to clipboard

Run action from a custom image

Open httpdss opened this issue 2 years ago • 6 comments

Suggestion

currently all actions run from a dflook built image. TERRAFORM_PRE_RUN has to constantly run to install specific packages. im thinking on an image: input where we can point to a custom image on our docker repo.

httpdss avatar Nov 16 '22 20:11 httpdss

Hello @httpdss, I'd love to add this but I don't think it's possible. The metadata format doesn't allow image to reference input or environment variables 😞.

dflook avatar Nov 19 '22 20:11 dflook

Is there still no way to achieve this? I would like to use this action but my terraform requires the AWS cli be installed inside the docker container.

jonathan-d-palumbo avatar Nov 16 '23 15:11 jonathan-d-palumbo

@jonathan-d-palumbo The TERRAFORM_PRE_RUN environment variable will let you install the aws cli, the downside is it needs to run for every step. There is still no way I know of the use a custom image with it pre-installed.

dflook avatar Nov 21 '23 17:11 dflook

@dflook Thanks for your response. Much appreciated, I suppose if needed I can always fork the repository. It seems excessive but I'm not sure I want to install AWS each time the action runs either.

jonathan-d-palumbo avatar Nov 21 '23 21:11 jonathan-d-palumbo

I've written up the options available for customising the image here.

dflook avatar Nov 22 '23 15:11 dflook

You da man dflook! Thank you.

jonathan-d-palumbo avatar Nov 24 '23 18:11 jonathan-d-palumbo