cloud-platform-terraform-opensearch
This Terraform module will create an AWS OpenSearch domain for use on the Cloud Platform.
It also creates an IRSA to allow access via your Cloud Platform namespace pods, and a proxy webserver to automatically sign requests to your OpenSearch domain from your pods.
module "opensearch" {
source = " github.com/ministryofjustice/cloud-platform-terraform-opensearch?ref=version" # use the latest release
# VPC/EKS configuration
vpc_name = var. vpc_name
eks_cluster_name = var. eks_cluster_name
# Cluster configuration
engine_version = " OpenSearch_2.5"
cluster_config = {
instance_count = 2
instance_type = " t3.small.search"
}
ebs_options = {
volume_size = 10
}
# Tags
business_unit = var. business_unit
application = var. application
is_production = var. is_production
team_name = var. team_name
namespace = var. namespace
environment_name = var. environment
infrastructure_support = var. infrastructure_support
}
See the examples/ folder for more information.
Name
Source
Version
irsa
github.com/ministryofjustice/cloud-platform-terraform-irsa
1.1.0
Name
Description
Type
Default
Required
advanced_options
Key-value string pairs to specify advanced configuration options
map(string)
{}
no
application
Application name
string
n/a
yes
business_unit
Area of the MOJ responsible for the service
string
n/a
yes
cluster_config
Configuration block for the cluster of the domain
map(any)
n/a
yes
ebs_options
Configuration block for EBS options for the domain
map(any)
n/a
yes
eks_cluster_name
The name of the eks cluster to retrieve the OIDC information
string
n/a
yes
engine_version
OpenSearch engine version
string
n/a
yes
environment_name
Environment name
string
n/a
yes
infrastructure_support
The team responsible for managing the infrastructure. Should be of the form ()
string
n/a
yes
is_production
Whether this is used for production or not
string
n/a
yes
namespace
Namespace name
string
n/a
yes
proxy_count
Replica count for OpenSearch proxy
number
1
no
team_name
Team name
string
n/a
yes
vpc_name
The name of the vpc (eg.: live-1)
string
n/a
yes
Name
Description
proxy_url
URL for opensearch-proxy service
Some of the inputs for this module are tags. All infrastructure resources must be tagged to meet the MOJ Technical Guidance on Documenting owners of infrastructure .
You should use your namespace variables to populate these. See the Usage section for more information.