GithubHelp home page GithubHelp logo

wellhealthinc / terraform-aws-elasticsearch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cloudposse/terraform-aws-elasticsearch

0.0 5.0 0.0 7 KB

License: Apache License 2.0

Makefile 3.47% HCL 96.53%

terraform-aws-elasticsearch's Introduction

Cloud Posse

terraform-aws-elasticsearch Build Status Latest Release Slack Community

Terraform module to provision an Elasticsearch cluster with built-in integrations with Kibana and Logstash.


This project is part of our comprehensive "SweetOps" approach towards DevOps.

It's 100% Open Source and licensed under the APACHE2.

Introduction

This module will create:

  • Elasticsearch cluster with the specified node count in the provided subnets in a VPC
  • Elasticsearch domain policy that accepts a list of IAM role ARNs from which to permit management traffic to the cluster
  • Security Group to control access to the Elasticsearch domain (inputs to the Security Group are other Security Groups or CIDRs blocks to be allowed to connect to the cluster)
  • DNS hostname record for Elasticsearch cluster (if DNS Zone ID is provided)
  • DNS hostname record for Kibana (if DNS Zone ID is provided)

NOTE: To enable zone awareness to deploy Elasticsearch nodes into two different Availability Zones, you need to set zone_awareness_enabled to true and provide two different subnets in subnet_ids. If you enable zone awareness for your domain, Amazon ES places an endpoint into two subnets. The subnets must be in different Availability Zones in the same region. If you don't enable zone awareness, Amazon ES places an endpoint into only one subnet

Usage

Basic example

module "elasticsearch" {
  source                  = "git::https://github.com/cloudposse/terraform-aws-elasticsearch.git?ref=master"
  namespace               = "eg"
  stage                   = "dev"
  name                    = "es"
  dns_zone_id             = "Z14EN2YD427LRQ"
  security_groups         = ["sg-XXXXXXXXX", "sg-YYYYYYYY"]
  vpc_id                  = "vpc-XXXXXXXXX"
  subnet_ids              = ["subnet-XXXXXXXXX", "subnet-YYYYYYYY"]
  zone_awareness_enabled  = "true"
  elasticsearch_version   = "6.2"
  instance_type           = "t2.small.elasticsearch"
  instance_count          = 4
  iam_role_arns           = ["arn:aws:iam::XXXXXXXXX:role/ops", "arn:aws:iam::XXXXXXXXX:role/dev"]
  iam_actions             = ["es:ESHttpGet", "es:ESHttpPut", "es:ESHttpPost"]
  encrypt_at_rest_enabled = "true"
  kibana_subdomain_name   = "kibana-es"

  advanced_options {
    "rest.action.multi.allow_explicit_index" = "true"
  }
}

Makefile Targets

Available targets:

  help                                This help screen
  help/all                            Display help for all targets
  lint                                Lint terraform code

Inputs

Name Description Type Default Required
advanced_options Key-value string pairs to specify advanced configuration options map <map> no
allowed_cidr_blocks List of CIDR blocks to be allowed to connect to the cluster list <list> no
attributes Additional attributes (e.g. 1) list <list> no
automated_snapshot_start_hour Hour at which automated snapshots are taken, in UTC string 0 no
dedicated_master_count Number of dedicated master nodes in the cluster string 0 no
dedicated_master_enabled Indicates whether dedicated master nodes are enabled for the cluster string false no
dedicated_master_type Instance type of the dedicated master nodes in the cluster string t2.small.elasticsearch no
delimiter Delimiter to be used between namespace, stage, name and attributes string - no
dns_zone_id Route53 DNS Zone ID to add hostname records for Elasticsearch domain and Kibana string `` no
ebs_iops The baseline input/output (I/O) performance of EBS volumes attached to data nodes. Applicable only for the Provisioned IOPS EBS volume type string 0 no
ebs_volume_size Optionally use EBS volumes for data storage by specifying volume size in GB string 0 no
ebs_volume_type Storage type of EBS volumes string gp2 no
elasticsearch_version Version of Elasticsearch to deploy string 6.2 no
enabled Set to false to prevent the module from creating any resources string true no
encrypt_at_rest_enabled Whether to enable encryption at rest string true no
encrypt_at_rest_kms_key_id The KMS key id to encrypt the Elasticsearch domain with. If not specified, then it defaults to using the AWS/Elasticsearch service KMS key string `` no
iam_actions List of actions to allow for the IAM roles, e.g. es:ESHttpGet, es:ESHttpPut, es:ESHttpPost list <list> no
iam_role_arns List of IAM role ARNs to permit access to the Elasticsearch domain list <list> no
instance_count Number of data nodes in the cluster string 4 no
instance_type Elasticsearch instance type for data nodes in the cluster string t2.small.elasticsearch no
kibana_subdomain_name The name of the subdomain for Kibana in the DNS zone (e.g. kibana, ui, ui-es, search-ui, kibana.elasticsearch) string kibana no
log_publishing_cloudwatch_log_group_arn ARN of the Cloudwatch log group to which log needs to be published string `` no
log_publishing_enabled Specifies whether log publishing option is enabled or not string false no
log_publishing_log_type A type of Elasticsearch log. Valid values: INDEX_SLOW_LOGS, SEARCH_SLOW_LOGS string SEARCH_SLOW_LOGS no
name Name of the application string - yes
namespace Namespace (e.g. eg or cp) string - yes
security_groups List of security group IDs to be allowed to connect to the cluster list <list> no
stage Stage (e.g. prod, dev, staging) string - yes
subnet_ids Subnet ids list - yes
tags Additional tags (e.g. map(BusinessUnit,XYZ) map <map> no
vpc_id VPC ID string - yes
zone_awareness_enabled Enable zone awareness for Elasticsearch cluster string true no

Outputs

Name Description
domain_arn ARN of the Elasticsearch domain
domain_endpoint Domain-specific endpoint used to submit index, search, and data upload requests
domain_hostname Elasticsearch domain hostname to submit index, search, and data upload requests
domain_id Unique identifier for the Elasticsearch domain
kibana_endpoint Domain-specific endpoint for Kibana without https scheme
kibana_hostname Kibana hostname
security_group_id Security Group ID to control access to the Elasticsearch domain

References

For additional context, refer to some of these links.

Help

Got a question?

File a GitHub issue, send us an email or join our Slack Community.

Commercial Support

Work directly with our team of DevOps experts via email, slack, and video conferencing.

We provide commercial support for all of our Open Source projects. As a Dedicated Support customer, you have access to our team of subject matter experts at a fraction of the cost of a full-time engineer.

E-Mail

  • Questions. We'll use a Shared Slack channel between your team and ours.
  • Troubleshooting. We'll help you triage why things aren't working.
  • Code Reviews. We'll review your Pull Requests and provide constructive feedback.
  • Bug Fixes. We'll rapidly work to fix any bugs in our projects.
  • Build New Terraform Modules. We'll develop original modules to provision infrastructure.
  • Cloud Architecture. We'll assist with your cloud strategy and design.
  • Implementation. We'll provide hands-on support to implement our reference architectures.

Community Forum

Get access to our Open Source Community Forum on Slack. It's FREE to join for everyone! Our "SweetOps" community is where you get to talk with others who share a similar vision for how to rollout and manage infrastructure. This is the best place to talk shop, ask questions, solicit feedback, and work together as a community to build sweet infrastructure.

Contributing

Bug Reports & Feature Requests

Please use the issue tracker to report any bugs or file feature requests.

Developing

If you are interested in being a contributor and want to get involved in developing this project or help out with our other projects, we would love to hear from you! Shoot us an email.

In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow.

  1. Fork the repo on GitHub
  2. Clone the project to your own machine
  3. Commit changes to your own branch
  4. Push your work back up to your fork
  5. Submit a Pull Request so that we can review your changes

NOTE: Be sure to merge the latest changes from "upstream" before making a pull request!

Copyright

Copyright © 2017-2018 Cloud Posse, LLC

License

License

See LICENSE for full details.

Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

  https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.

Trademarks

All other trademarks referenced herein are the property of their respective owners.

About

This project is maintained and funded by Cloud Posse, LLC. Like it? Please let us know at [email protected]

Cloud Posse

We're a DevOps Professional Services company based in Los Angeles, CA. We love Open Source Software!

We offer paid support on all of our projects.

Check out our other projects, apply for a job, or hire us to help with your cloud strategy and implementation.

Contributors

Erik Osterman
Erik Osterman
Andriy Knysh
Andriy Knysh
Igor Rodionov
Igor Rodionov
Sarkis Varozian
Sarkis Varozian

terraform-aws-elasticsearch's People

Contributors

aknysh avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.