{"id":29482587,"url":"https://github.com/LEGO/kube-tf-reconciler","last_synced_at":"2025-07-15T02:02:05.425Z","repository":{"id":301349905,"uuid":"1005388715","full_name":"LEGO/kube-tf-reconciler","owner":"LEGO","description":"Kubernetes Operator for reconciling terraform resources","archived":false,"fork":false,"pushed_at":"2025-07-14T12:10:43.000Z","size":344,"stargazers_count":203,"open_issues_count":4,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-14T16:09:28.915Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LEGO.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-20T06:42:20.000Z","updated_at":"2025-07-14T12:09:39.000Z","dependencies_parsed_at":"2025-07-14T14:11:09.006Z","dependency_job_id":"09401b9d-e298-41a0-938e-5e711997164c","html_url":"https://github.com/LEGO/kube-tf-reconciler","commit_stats":null,"previous_names":["lego/kube-tf-reconciler"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LEGO/kube-tf-reconciler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LEGO%2Fkube-tf-reconciler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LEGO%2Fkube-tf-reconciler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LEGO%2Fkube-tf-reconciler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LEGO%2Fkube-tf-reconciler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LEGO","download_url":"https://codeload.github.com/LEGO/kube-tf-reconciler/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LEGO%2Fkube-tf-reconciler/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265386079,"owners_count":23756747,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-15T02:01:15.159Z","updated_at":"2025-07-15T02:02:05.415Z","avatar_url":"https://github.com/LEGO.png","language":"Go","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Kube Terraform Reconciler\n\n**NOTE**: This project is currently developed for internal use, but may later be developed for broader consumption\n\nKube Terraform Reconciler (krec) is a Kubernetes operator for managing infrastructure as code using Terraform. It allows you to define Terraform workspaces as Kubernetes custom resources and automatically reconciles your infrastructure based on these resources.\n\nFeatures\n- Define Terraform workspaces as Kubernetes resources\n- Automatic reconciliation of infrastructure\n- Support for custom providers and modules\n- Terraform backend configuration\n- Auto-apply functionality\n- State tracking through Kubernetes status\n\n## Usage\n\nCreate a Workspace resource:\n\n```yaml\napiVersion: tf-reconcile.lego.com/v1alpha1\nkind: Workspace\nmetadata:\n  name: workspace1\nspec:\n  terraformVersion: 1.11.2\n  tf:\n    env:\n      - name: AWS_REGION\n        value: eu-west-1\n      - name: AWS_ACCESS_KEY_ID\n        secretKeyRef:\n          name: aws-access-key\n          key: access-key-id\n      - name: AWS_SECRET_ACCESS_KEY\n        secretKeyRef:\n          name: aws-access-key\n          key: secret-access-key\n      - name: AWS_SESSION_TOKEN\n        secretKeyRef:\n          name: aws-access-key\n          key: session-token\n  backend:\n    type: local\n  providerSpecs:\n    - name: aws\n      source: hashicorp/aws\n      version: 5.94.1\n  module:\n    name: my-module\n    source: terraform-aws-modules/iam/aws//modules/iam-read-only-policy\n    inputs:\n      name: \"awesome-role-krec-testing\"\n      path: \"/\"\n      description: \"My example read-only policy\"\n      allowed_services: [\"rds\", \"dynamo\"]\n```\n\n## Contributors Guide\n\nEnsure CRDs are updated by running the following command:\n\n```bash\ngo generate ./...\n```\n\nRunning tests\n\n```bash\ngo test ./... -v\n```\n\n## Debugging in a live cluster\n\nTo debug the operator locally:\n\n1. build the debug image:\n```bash\ndocker build -f Dockerfile.debug -t krec:debug .\n```\n\n*ALTERNATIVELY, with minikube it's possible to directly build images into minikube's internal Docker Engine, which makes step 2 unneccessary*\n```bash\neval $(minikube docker-env)\ndocker build -f Dockerfile.debug -t krec:debug .\n```\n\n2. Load the image into your local Kubernetes cluster:\n```bash\n# For KIND\nkind load docker-image krec:debug\n\n# For Minikube\nminikube image load krec:debug\n```\n\n3. Deploy the operator with the debug image (make sure the CRD is installed beforehand):\n```bash\nkubectl apply -f samples/debug-deployment.yaml\n```\n\n4. Set up port forwarding:\n```bash\nkubectl port-forward -n krec-debug svc/krec-debug 2345:2345\n```\n\n5. Connect your debugger:\n\n- For VS Code: Configure launch.json to connect to localhost:2345\n- For GoLand: Set up a Go Remote configuration targeting localhost:2345\n- For Delve CLI: dlv connect localhost:2345\n\n## License\n\nThis project is licensed under Apache License 2.0. See the [LICENSE](LICENSE)\n\n### MPL Dependencies\n\nThis project includes the following dependencies that are licensed under the Mozilla Public License (MPL):\n\n- [https://github.com/hashicorp/go-version](https://github.com/hashicorp/go-version)\n- [https://github.com/hashicorp/hc-install](https://github.com/hashicorp/hc-install)\n- [https://github.com/hashicorp/hcl](https://github.com/hashicorp/hcl/v2)\n- [https://github.com/hashicorp/terraform-exec](https://github.com/hashicorp/terraform-exec)\n\n#### MPL Modifications\n\nIf you change any MPL-2.0 files, you must distribute those modified files under the MPL-2.0.\nThe full text of the MPL licenses can be found in the [LICENSES folder](LICENSES). Its recommended to look at the licenses stipulated in the repositories of the dependencies as listed above to make sure they are up to date.\n\n## Contributions\n\nWe welcome contributions to the Kube TF Reconciler, please read the [contribution guidelines](./CONTRIBUTING.md) for more information on how to contribute.\n\nAs this project is in the early stages of development, we are still working on the contribution guidelines and best practices.\nWe appreciate your patience and understanding as we work to improve the project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLEGO%2Fkube-tf-reconciler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLEGO%2Fkube-tf-reconciler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLEGO%2Fkube-tf-reconciler/lists"}