upbound / provider-terraform

A Crossplane provider for Terraform
https://marketplace.upbound.io/providers/upbound/provider-terraform/
Apache License 2.0
150 stars 59 forks source link

Terraform modules/providers cache pre-population #166

Closed yuriy-yarosh closed 1 year ago

yuriy-yarosh commented 1 year ago

What problem are you facing?

I want to run this provider in airgap environment, with no internet connection. It's crucial to be able to pre-populate the .terraform providers/modules cache from an external storage (e.g. S3 bucket).

How could Official Terraform Provider help solve your problem?

It would've been nice if there was a way to manage .terraform caches across multiple workspaces, and sync up the respective contents, with a minio S3 bucket, or similar external storage.

bobh66 commented 1 year ago

I'm not following how an air-gapped deployment would have access to an S3 bucket?

One solution is to create a custom image that has the providers pre-installed.

Another solution will be available in Crossplane 1.13 when Volumes/Volume Mounts are supported in the ControllerConfig, so you can mount a volume with the providers installed and set the TF_PLUGIN_CACHE_DIR environment variable to point at the mounted volume.

yuriy-yarosh commented 1 year ago

@bobh66

would have access to an S3 bucket?

It could be a minio bucket.

One solution is to create a custom image that has the providers pre-installed.

Works for me.

Another solution will be available in Crossplane 1.13 when Volumes/Volume Mounts are supported in the ControllerConfig,

Didn't know about that, thank you. This should also work.

Closing the issue.