Skip to content
Open
Show file tree
Hide file tree
Changes from 4 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
35 changes: 19 additions & 16 deletions examples/basic/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,24 @@ module "database" {

# wait 60 secs to allow IAM credential access to kick in before configuring instance
# without the wait, you can intermittently get "Error 401 (Unauthorized)"
resource "time_sleep" "wait" {
depends_on = [module.database]
create_duration = "60s"
}

resource "elasticsearch_index" "test" {
depends_on = [time_sleep.wait]
name = "terraform-test"
number_of_shards = 1
number_of_replicas = 1
force_destroy = true
}
# Temporarily disabling index creation due to an know issue blocking the pipeline : https://github.ibm.com/GoldenEye/issues/issues/16245.

resource "elasticsearch_cluster_settings" "global" {
depends_on = [time_sleep.wait]
cluster_max_shards_per_node = 10
action_auto_create_index = "my-index-000001,index10,-index1*,+ind*"
}
# resource "time_sleep" "wait" {
# depends_on = [module.database]
# create_duration = "60s"
# }

# resource "elasticsearch_index" "test" {
# depends_on = [time_sleep.wait]
# name = "terraform-test"
# number_of_shards = 1
# number_of_replicas = 1
# force_destroy = true
# }

# resource "elasticsearch_cluster_settings" "global" {
# depends_on = [time_sleep.wait]
# cluster_max_shards_per_node = 10
# action_auto_create_index = "my-index-000001,index10,-index1*,+ind*"
# }
9 changes: 5 additions & 4 deletions examples/basic/version.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ terraform {
version = ">= 2.0.7"
}
# The time provider is not actually required by the module itself, just this example, so OK to use ">=" here instead of locking into a version
time = {
source = "hashicorp/time"
version = ">= 0.9.1"
}

# time = {
# source = "hashicorp/time"
# version = ">= 0.9.1"
# }
}
}
7 changes: 5 additions & 2 deletions solutions/fully-configurable/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,11 @@ locals {
}

data "http" "es_metadata" {
count = var.enable_kibana_dashboard ? 1 : 0
url = "https://${local.elasticsearch_username}:${local.admin_pass}@${local.elasticsearch_hostname}:${local.elasticsearch_port}"
count = var.enable_kibana_dashboard ? 1 : 0
url = "https://${local.elasticsearch_hostname}:${local.elasticsearch_port}"
request_headers = {
Authorization = "Basic ${base64encode("${local.elasticsearch_username}:${local.admin_pass}")}"
}
ca_cert_pem = base64decode(local.elasticsearch_cert)
}

Expand Down