{"id":19748681,"url":"https://github.com/doitintl/terraform-eks-lens","last_synced_at":"2025-07-08T20:37:55.614Z","repository":{"id":228407676,"uuid":"773843548","full_name":"doitintl/terraform-eks-lens","owner":"doitintl","description":"Terraform module to deploy EKS Lens feature","archived":false,"fork":false,"pushed_at":"2025-01-30T15:41:32.000Z","size":73,"stargazers_count":2,"open_issues_count":2,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-25T14:18:57.984Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/doitintl.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}},"created_at":"2024-03-18T13:52:55.000Z","updated_at":"2025-01-30T15:36:33.000Z","dependencies_parsed_at":"2024-05-16T08:54:26.370Z","dependency_job_id":null,"html_url":"https://github.com/doitintl/terraform-eks-lens","commit_stats":null,"previous_names":["doitintl/terraform-eks-lens"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doitintl%2Fterraform-eks-lens","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doitintl%2Fterraform-eks-lens/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doitintl%2Fterraform-eks-lens/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doitintl%2Fterraform-eks-lens/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doitintl","download_url":"https://codeload.github.com/doitintl/terraform-eks-lens/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241078772,"owners_count":19905923,"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":"2024-11-12T02:22:56.707Z","updated_at":"2025-02-28T00:28:24.503Z","avatar_url":"https://github.com/doitintl.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# terraform-eks-lens\n\nTerraform modules to deploy DoiT's EKS Lens feature to AWS.\n\n## Requirements\n\n### Installation Dependencies\n\n- [Terraform](https://www.terraform.io/downloads.html) \u003e= 1.5.0\n- [terraform-provider-aws](https://github.com/terraform-providers/terraform-provider-aws) v5.3+\n- [terraform-provider-kubernetes](https://github.com/terraform-providers/terraform-provider-kubernetes) plugin v2.2+\n\n## Modules\n\n- [region-base](https://github.com/doitintl/terraform-eks-lens/blob/main/region-base/) - creates the base resources required for running EKS Lens in an account and region.\n- [cluster](https://github.com/doitintl/terraform-eks-lens/blob/main/cluster/) - creates the resources required for EKS Lens in a given Kubernetes cluster and optionally deploys it to that cluster.\n\n## Provider configuration\n\nSee some configuration example in [providers_example.tf](https://github.com/doitintl/terraform-eks-lens/blob/main/provider.tf.example).\n\n### AWS Provider\n\nIf not already in use, the [AWS provider](https://registry.terraform.io/providers/hashicorp/aws/latest/docs) will need to be configured by adding a `provider` block.\n\n### Kubernetes Provider\n\nIf not already in use, the [Kubernetes provider](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs) will need to be configured by adding a `provider` block.\n\n## Usage\n\nDownload your accounts Terraform configuration from the EKS Lens console and place it alongside your provider configuration.\n\nThen run the following commands:\n```bash\nterraform init\nterraform plan\nterraform apply\n```\n\nThe configuration file should contain the following module definitions:\n\n### Once per account and region\n\nThe `region-base` module needs to be created _once_ per account and region.\n\n```hcl\nmodule \"\u003cREGION_NAME\u003e-base\" {\n  source = \"git::https://github.com/doitintl/terraform-eks-lens.git//region-base\"\n}\n```\n\nThe region and account ID are [inferred](https://github.com/doitintl/terraform-eks-lens/blob/main/region-base/main.tf#L5-L6) from your AWS provider configuration.\nMake sure that your AWS provider is configured to use the correct account and region.\n\n### Per cluster\n\nThe `cluster` module needs to be created once _per cluster_.\n\n```hcl\nmodule \"\u003cREGION\u003e-\u003cCLUSTER_NAME\u003e\" {\n  source = \"git::https://github.com/doitintl/terraform-eks-lens.git//cluster\"\n\n  cluster = {\n    name             = \"\u003cCLUSTER_NAME\u003e\"\n    deployment_id    = \"\u003cDEPLOYMENT_ID\u003e\"\n    kube_state_image = \"registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.9.2\" # make sure to use the latest available image\n    otel_image       = \"otel/opentelemetry-collector-contrib:0.83.0\" # make sure to use the latest available image\n  }\n  # If running in EKS:\n  cluster_oidc_issuer_url = \"\u003cCLUSTER_OIDC_ISSUER_URL\u003e\"\n  # Alternatively, if managing your own cluster on EC2, set `cluster_oidc_issuer_url` to an empty string and uncomment the following:\n  #ec2_cluster = true\n\n  # By default, this module will also deploy the k8s manifests. Set to `false` if planning to deploy with another tool\n  #deploy_manifests = false\n\n  # when configuring multiple providers for different clusters, you can configure the module to use to correct provider alias:\n  providers = {\n    kubernetes = kubernetes.\u003cPROVIDER_ALIAS\u003e\n  }\n}\n```\n\n## DoiT webhooks for on/off-boarding\n\nThe `cluster` module contains a `null_resource` that should run a webhook on creation and destruction of a given cluster module.\n\nThe on-boarding hook validates your cluster deployment and registers it. If it fails on creation, you might need to try applying again for it to register successfully.\n\nThe off-boarding hook de-registers your cluster deployment. In case it fails you might need to manually call the webhook:\n\n```bash\ncurl -X POST -H 'Content-Type: application/json' -d '{\"account_id\": \"\u003c\u003cAccountID\u003e\u003e\",\"region\": \"\u003c\u003cRegion\u003e\u003e\",\"cluster_name\": \"\u003c\u003cClusterName\u003e\u003e\", \"deployment_id\": \"\u003c\u003cDeploymentID\u003e\u003e\" }' https://console.doit.com/webhooks/v1/eks-metrics/terraform-destroy\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoitintl%2Fterraform-eks-lens","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoitintl%2Fterraform-eks-lens","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoitintl%2Fterraform-eks-lens/lists"}