Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support custom endpoint configuration #1

Merged
merged 1 commit into from
Apr 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,11 @@ resource "aws_elasticsearch_domain" "default" {
}

domain_endpoint_options {
enforce_https = var.domain_endpoint_options_enforce_https
tls_security_policy = var.domain_endpoint_options_tls_security_policy
enforce_https = var.domain_endpoint_options_enforce_https
tls_security_policy = var.domain_endpoint_options_tls_security_policy
custom_endpoint_enabled = var.custom_endpoint_enabled
custom_endpoint = var.custom_endpoint_enabled ? var.custom_endpoint : null
custom_endpoint_certificate_arn = var.custom_endpoint_enabled ? var.custom_endpoint_certificate_arn : null
}

cluster_config {
Expand Down
18 changes: 18 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -333,3 +333,21 @@ variable "advanced_security_options_master_user_password" {
default = ""
description = "Master user password (applicable if advanced_security_options_internal_user_database_enabled set to true)"
}

variable "custom_endpoint_enabled" {
type = bool
description = "Whether to enable custom endpoint for the Elasticsearch domain."
default = false
}

variable "custom_endpoint" {
type = string
description = "Fully qualified domain for custom endpoint."
default = ""
}

variable "custom_endpoint_certificate_arn" {
type = string
description = "ACM certificate ARN for custom endpoint."
default = ""
}
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 2.0"
version = ">= 3.35.0"
}
template = {
source = "hashicorp/template"
Expand Down