-
Notifications
You must be signed in to change notification settings - Fork 69
/
configuration_hcl_ecdeployment.yaml
59 lines (48 loc) · 1.15 KB
/
configuration_hcl_ecdeployment.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
apiVersion: terraform.core.oam.dev/v1beta1
kind: Configuration
metadata:
name: ec-deployment
spec:
hcl: |
terraform {
required_providers {
ec = {
source = "elastic/ec"
version = "0.2.1"
}
}
}
data "ec_stack" "latest" {
version_regex = "latest"
region = var.ec_region
}
resource "ec_deployment" "project" {
name = var.project_name
region = var.ec_region
version = data.ec_stack.latest.version
deployment_template_id = "gcp-io-optimized"
elasticsearch {
autoscale = "true"
}
kibana {}
}
output "ES_HTTPS_ENDPOINT" {
value = ec_deployment.project.elasticsearch[0].https_endpoint
}
output "ES_PASSWORD" {
value = ec_deployment.project.elasticsearch_password
sensitive = true
}
variable "ec_region" {
default = "gcp-us-west1"
}
variable "project_name" {
default = "example"
}
variable:
project_name: "es-project-1"
writeConnectionSecretToRef:
name: es-connection
namespace: default
providerRef:
name: default