{"id":24388145,"url":"https://github.com/masterpointio/tf-controller-poc","last_synced_at":"2026-02-15T20:32:49.901Z","repository":{"id":65653363,"uuid":"585098679","full_name":"masterpointio/tf-controller-poc","owner":"masterpointio","description":"POC to reconcile and operate our resources on AWS via GitOps Terraform Controller","archived":false,"fork":false,"pushed_at":"2023-02-21T08:04:51.000Z","size":56,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-20T03:38:40.367Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/masterpointio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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":"2023-01-04T10:10:06.000Z","updated_at":"2024-12-30T00:49:47.000Z","dependencies_parsed_at":"2025-07-01T14:45:47.288Z","dependency_job_id":null,"html_url":"https://github.com/masterpointio/tf-controller-poc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/masterpointio/tf-controller-poc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masterpointio%2Ftf-controller-poc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masterpointio%2Ftf-controller-poc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masterpointio%2Ftf-controller-poc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masterpointio%2Ftf-controller-poc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/masterpointio","download_url":"https://codeload.github.com/masterpointio/tf-controller-poc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masterpointio%2Ftf-controller-poc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29488564,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T19:29:10.908Z","status":"ssl_error","status_checked_at":"2026-02-15T19:29:10.419Z","response_time":118,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-01-19T13:56:29.777Z","updated_at":"2026-02-15T20:32:49.884Z","avatar_url":"https://github.com/masterpointio.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tf-controller-poc\nPOC to reconcile and operate our resources in AWS via GitOps [Terraform Controller](https://docs.gitops.weave.works/docs/terraform/get-started/) using a local `kind` cluster.\n\n## Installation and Configuration\n\n1. Create a new `kind` cluster\n```bash\nkind create cluster\n```\n\n2. Install Flux Subsystem for Argo from scratch\n```bash\nkubectl create ns argocd\nkubectl -n argocd apply -k \"https://github.com/flux-subsystem-argo/flamingo//release?ref=v2.4.12-fl.2-main-d68e6cb8\"\n```\n\n3. Install Flux\n```bash\nbrew install fluxcd/tap/flux\nflux install\n```\n4. Setup ArgoCD\n    Get ArgoCD admin creds\n```bash\nkubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath=\"{.data.password}\" | base64 -d; echo\n```\n    Forward local port to ArgoCD in background\n```\nkubectl -n argocd port-forward svc/argocd-server 8080:443 \u0026\n```\n\nNow you're able to use ArgoCD Dashboard: `https://localhost:8080/applications`\n\n5. Create a K8s secret with the AWS creds\n\n```\nkubectl create ns infra\nkubectl -n infra create secret generic aws-credentials --from-literal=AWS_ACCESS_KEY_ID=$POC_ACCESS_KEY_ID --from-literal=AWS_SECRET_ACCESS_KEY=$POC_ACCESS_SECRET_KEY --from-literal=AWS_DEFAULT_REGION=\"us-east-1\"\n```\n### Prepare the backend\n\n* Start AWS session.\n* Run `terraform apply` manually from `./terraform/tfstate-backend`. That will create an S3 bucket, DynamoDB table, and a number of IAM resources required for backend configuration.\n\n## Start GitOpsing\n\nApply the bootstrap part. That installs tf-controller, required RBAC set, and GitRepository object:\n\n```bash\nkubectl apply -f ./argocd-bootstrap-app.yaml\n```\n\nValidate this installation (values will be encrypted):\n\n```bash\nkubectl -n infra get secret tfstate-backend-outputs -o jsonpath=\"{.data}\"\n```\nNow the backend is gitopsed.\n\n### Create VPC + EC2 instanse\n\nApply `ingfa` application:\n\n```bash\nkubectl apply -f ./argocd-infra-app.yaml\n```\n\n## Open questions\n\n1. Why there are extra GitRepository objects when we have only 1 in the repo (named `tf-controller-poc`)?\n    ```\n    kubectl get gitrepositories.source.toolkit.fluxcd.io -A\n    NAMESPACE   NAME                URL                                                  AGE     READY   STATUS\n    infra       bootstrap           https://github.com/masterpointio/tf-controller-poc   3d20h   True    stored artifact for revision 'poc-1/46ca9138db9a958e9251f951f4168a0e21ef396b'\n    infra       infra               https://github.com/masterpointio/tf-controller-poc   3d      True    stored artifact for revision 'poc-1/46ca9138db9a958e9251f951f4168a0e21ef396b'\n    infra       tf-controller-poc   https://github.com/masterpointio/tf-controller-poc   3d20h   True    stored artifact for revision 'poc-1/46ca9138db9a958e9251f951f4168a0e21ef396b'\n    ```\n\n    Same issue could be seen in the [hello-world](https://flux-subsystem-argo.github.io/website/tutorials/terraform/) example - [link to the screenshot](https://flux-subsystem-argo.github.io/website/tutorials/terraform_4.png).\n\n## Tips helpful for debugging\n\n* To check the description of latest installation:\n\n    ```bash\n    helm -n flux-system history tf-controller\n    ```\n\n* To watch runner logs for `ec2`:\n\n    ```bash\n    kubectl -n infra logs -f ec2-tf-runner\n    ```\n    Runner name is compiled using the pattern: `\u003cTerraform_Object_Name\u003e-tf-runner`\n\n* Use [Terraform Controller CLI](https://docs.gitops.weave.works/docs/terraform/tfctl/) if you need to manage tf-controller or Terraform resources in a manual mode.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasterpointio%2Ftf-controller-poc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmasterpointio%2Ftf-controller-poc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasterpointio%2Ftf-controller-poc/lists"}