{"id":23744540,"url":"https://github.com/openobserve/openobserve-eks-iac","last_synced_at":"2026-02-18T11:03:38.608Z","repository":{"id":270420243,"uuid":"910288966","full_name":"openobserve/openobserve-eks-iac","owner":"openobserve","description":"Welcome to the repository for Terraform modules designed to streamline the deployment of Amazon Elastic Kubernetes Service (EKS) and OpenObserve. These modules are built with flexibility and ease of use in mind, empowering teams to set up scalable and robust infrastructures efficiently.","archived":false,"fork":false,"pushed_at":"2025-01-10T21:05:01.000Z","size":2641,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-26T01:51:06.848Z","etag":null,"topics":["aws","infrastructure-as-code","terraform","terraform-module"],"latest_commit_sha":null,"homepage":"https://openobserve.ai/","language":"Makefile","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/openobserve.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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-12-30T22:26:20.000Z","updated_at":"2025-01-10T20:57:57.000Z","dependencies_parsed_at":"2024-12-31T03:21:01.760Z","dependency_job_id":"d0c35c0c-cad4-4b50-bf7d-e249998caf71","html_url":"https://github.com/openobserve/openobserve-eks-iac","commit_stats":null,"previous_names":["openobserve/openobserve-eks-iac"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openobserve%2Fopenobserve-eks-iac","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openobserve%2Fopenobserve-eks-iac/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openobserve%2Fopenobserve-eks-iac/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openobserve%2Fopenobserve-eks-iac/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openobserve","download_url":"https://codeload.github.com/openobserve/openobserve-eks-iac/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248526258,"owners_count":21118848,"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":["aws","infrastructure-as-code","terraform","terraform-module"],"created_at":"2024-12-31T12:24:08.438Z","updated_at":"2026-02-18T11:03:38.602Z","avatar_url":"https://github.com/openobserve.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# OpenObserve Infrastructure Management\n\nThis repository provides a set of `make` commands to manage the lifecycle of your infrastructure using Terraform, along with cost estimation via Infracost.\n\n## Terraform Overview\n\n![AWS IaC FinOps](./assets/terraform-flow.gif)\n\n### 1. Provider Setup\nProvider Setup (provider.tf): This specifies the providers (AWS) and region configurations.\nVariables (variables.tf): Centralized file for variables that parameterize the configuration, such as region, cluster name, instance types, etc.\n\n### 2. Networking Layer\nVPC and Subnets (eks-cluster.tf): Define the VPC, subnets (public/private), and any additional networking components, like route tables and internet gateways if needed.\n\n### 3. EKS Cluster and Node Group\nEKS Cluster Setup (eks-cluster.tf): Define the EKS cluster and its version. Specify node groups, which will include details like instance type and desired capacity for Kubernetes worker nodes.\nIAM Roles and Policies (policies.tf): Attach necessary IAM policies and roles for the EKS service, including any policies required by the Kubernetes service accounts to access AWS resources (e.g., S3, RDS).\n\n### 4. Additional AWS Services\nS3 for Object Storage (s3-iam.tf): Create an S3 bucket specifically for OpenObserve, if it’s used for storing observability data. Set up an IAM role with S3 permissions for OpenObserve access.\nRDS PostgreSQL Database (rds-postgres.tf): Provision an RDS PostgreSQL instance for OpenObserve’s backend storage. Configure security groups and IAM roles, allowing OpenObserve and EKS to connect to RDS securely.\n\n### 5. Output and State Management\nOutputs (outputs.tf): Output details that other resources or configurations might need (e.g., RDS endpoint, S3 bucket name, IAM roles).\nState Management (terraform.tfstate): state file will be moved to S3 and DynamoDB for remote state management and locking.\n\n## NOTE\n\nThis release consists terraform files and other files that help you to build an EKS and deploy OpenObserve. The only manual intervention will be to configure your DNS in Route53 by grabbing the NLB.\n\n## OpenTofu compatibility\n\nTo use this repository with opentofu, you need to modify provider.tf and then use the Makefile that is placed under opentofu directory. \n\n## Prerequisites\n\nBefore you begin, ensure that the following tools are installed:\n\n- [Terraform](https://www.terraform.io/downloads.html) or [OpenTofu](https://opentofu.org/docs/intro/install/)\n- [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html)\n- [Infracost](https://www.infracost.io/docs/)\n\n### Environment Variables\n\nMake sure you have the following environment variables configured:\n\n- `ENV`: The environment you are targeting (e.g., `dev`, `staging`, `prod`).\n- `CUSTOMER_NAME`: The name of the customer for whom the infrastructure is being managed.\n- `AWS_PROFILE`: The AWS profile to use for authentication.\n- `API_KEY`: Your Infracost API key for cost estimation.\n\n---\n\n## Usage\n\n### 1. Modify tfvars (`init`)\n\n```bash\nroot_user_email    = \"example@openobserve.ai\"\nroot_user_password = \"CustomSecurePassword123\"\no2_domain          = \"example.openobserve.ai\"\no2_dex_domain      = \"example-auth.openobserve.ai\"\nsecret_name        = \"example\"\n```\n\n### 2. Initialize Terraform (`init`)\n\nBefore you can plan or apply your Terraform configuration, you need to initialize the working directory containing your configuration files. This command will download all necessary Terraform modules and providers.\n\n```bash\nmake init ENV=\u003cenvironment\u003e CUSTOMER_NAME=\u003ccustomer\u003e AWS_PROFILE=\u003caws_profile\u003e\n```\n\nFor example:\n\n```bash\nmake init ENV=dev CUSTOMER_NAME=example AWS_PROFILE=my-aws-profile\n```\n\n### 3. Plan Terraform Changes (`plan`)\n\nThe `plan` command will show the changes Terraform will apply to the infrastructure without making any actual changes. This is useful for reviewing proposed changes.\n\n```bash\nmake plan ENV=\u003cenvironment\u003e CUSTOMER_NAME=\u003ccustomer\u003e AWS_PROFILE=\u003caws_profile\u003e\n```\n\nFor example:\n\n```bash\nmake plan ENV=dev CUSTOMER_NAME=example AWS_PROFILE=my-aws-profile\n```\n\n### 4. Apply Terraform Changes (`apply`)\n\nAfter reviewing the plan, you can apply the changes using the `apply` command.\n\n```bash\nmake apply ENV=\u003cenvironment\u003e CUSTOMER_NAME=\u003ccustomer\u003e AWS_PROFILE=\u003caws_profile\u003e\n```\n\nFor example:\n\n```bash\nmake apply ENV=prod CUSTOMER_NAME=example AWS_PROFILE=my-aws-profile\n```\n\n### 5. Run Pre Setup to install dependencies (`o2_pre_setup`)\n\nAfter applying, you can run pre deployment.\n\n```bash\nmake o2_pre_setup ENV=\u003cenvironment\u003e CUSTOMER_NAME=\u003ccustomer\u003e AWS_PROFILE=\u003caws_profile\u003e\n```\n\nFor example:\n\n```bash\nmake o2_pre_setup ENV=prod CUSTOMER_NAME=example AWS_PROFILE=my-aws-profile\n```\n\n### 6. Run deployment command to deploy OpenObserve on EKS (`o2_deployment`)\n\nAfter pre deployment, you can deploy helm chart using `o2_deployment`.\n\n```bash\nmake o2_deployment ENV=\u003cenvironment\u003e CUSTOMER_NAME=\u003ccustomer\u003e AWS_PROFILE=\u003caws_profile\u003e\n```\n\nFor example:\n\n```bash\nmake o2_deployment ENV=prod CUSTOMER_NAME=example AWS_PROFILE=my-aws-profile\n```\n\n### 7. Destroy Terraform Infrastructure (`destroy`) \n\nIf you need to tear down the infrastructure, use the `destroy` command. **Be careful**, as this will remove all resources managed by Terraform for the specified environment and customer.\n\n```bash\nmake destroy ENV=\u003cenvironment\u003e CUSTOMER_NAME=\u003ccustomer\u003e AWS_PROFILE=\u003caws_profile\u003e\n```\n\nFor example:\n\n```bash\nmake destroy ENV=dev CUSTOMER_NAME=example AWS_PROFILE=my-aws-profile\n```\n\n### 8. Estimate Infrastructure Costs (`estimate`)\n\nYou can estimate the cost of your Terraform infrastructure using Infracost with the `estimate` command. This command will generate a cost breakdown based on your Terraform plan.\n\n```bash\nmake estimate ENV=\u003cenvironment\u003e CUSTOMER_NAME=\u003ccustomer\u003e AWS_PROFILE=\u003caws_profile\u003e API_KEY=\u003cinfracost_api_key\u003e\n```\n\nFor example:\n\n```bash\nmake estimate ENV=prod CUSTOMER_NAME=example AWS_PROFILE=my-aws-profile API_KEY=your-infracost-api-key\n```\n\nThe `estimate` command will:\n- Generate a Terraform plan.\n- Convert the plan to JSON.\n- Use Infracost to generate a cost breakdown based on the plan.\n\n![AWS IaC FinOps](./assets/infracost.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenobserve%2Fopenobserve-eks-iac","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenobserve%2Fopenobserve-eks-iac","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenobserve%2Fopenobserve-eks-iac/lists"}