Using runner image with pre-downloaded providers #321
artem-nefedov
started this conversation in
Show and tell
Replies: 2 comments
-
|
Thank you for sharing! |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Updated for improved setup that avoids copying providers into node filesystem and supports multiarch build. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Just wanted to share my experience of creating runner image with pre-downloaded providers on a filesystem mirror, so people can avoid having same problems. Reasons why you may want to use pre-downloaded providers: security/compliance, network limitations, startup performance, etc.
Originally, I just built the image and put
.terraformrcwith "provider_installation" section into "/home/runner". Testing it just by runningterraform initinside the image seemed to work (as seen byInstalled ... (unauthenticated)messages). However, during the actual runner pod execution when applying Terraform resource, providers were still downloaded from the internet. Turns out, the reason is the fact that runner Pod manifest overrides existing "/home/runner" by mountingemptyDirvolume there.The solution I came up with is generating
.terraformrcat startup.Below is the whole setup (it also changes
terraformexecutable version):Beta Was this translation helpful? Give feedback.
All reactions