fluxcd / terraform-provider-flux

Terraform and OpenTofu provider for bootstrapping Flux
https://registry.terraform.io/providers/fluxcd/flux/latest
Apache License 2.0
336 stars 89 forks source link

[Enhancement]: Allow provider to use environment variables for kube configuration like k8s/helm terraform provider #655

Open swade1987 opened 1 month ago

swade1987 commented 1 month ago

Description

Many people using the flux provider also use the Kubernetes and Helm terraform providers.

Both these providers allow you to pass Kubernetes configuration via environment variables.

Therefore, the flux provider should additionally allow this to maintain alignment.

Affected Resource(s) and/or Data Source(s)

N/A

Potential Terraform Configuration

No response

References

The majority of the discussion has happened in https://github.com/fluxcd/terraform-provider-flux/issues/440

Would you like to implement a fix?

Yes

swade1987 commented 1 month ago

From @networkhermit

I managed to verify that https://github.com/fluxcd/terraform-provider-flux/pull/506 added support for KUBE_CONFIG_PATH and KUBE_CONFIG_PATH support since v1.0.0. But the other options such as KUBE_CLIENT_CERT_DATA/KUBE_CLIENT_KEY_DATA/KUBE_CLUSTER_CA_CERT_DATA/KUBE_HOST still not supported.