diff --git a/terraform/opensearch-v2.11-r6g.2xlarge-search-domain1/common.tf b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain1/common.tf new file mode 100644 index 0000000..10568c1 --- /dev/null +++ b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain1/common.tf @@ -0,0 +1,11 @@ + +################################################################################ +# This is the bucket holding this specific setup tfstate +################################################################################ +terraform { + backend "s3" { + bucket = "performance-cto-group" + region = "us-east-1" + } +} + diff --git a/terraform/opensearch-v2.11-r6g.2xlarge-search-domain1/db.tf b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain1/db.tf new file mode 100644 index 0000000..26904dc --- /dev/null +++ b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain1/db.tf @@ -0,0 +1,75 @@ +variable "domain_name" { + description = "The name of the OpenSearch domain" + type = string + default = "vector-benchmark-d1" # You can override this value during `terraform apply` +} + + +data "aws_caller_identity" "current" {} + +resource "aws_opensearch_domain" "example" { + domain_name = var.domain_name + engine_version = "OpenSearch_2.11" + + cluster_config { + instance_type = "r6g.2xlarge.search" + } + + advanced_security_options { + enabled = false + anonymous_auth_enabled = true + internal_user_database_enabled = true + master_user_options { + master_user_name = "opensearch" + master_user_password = "Performance2025#" + } + } + + encrypt_at_rest { + enabled = true + } + + # The Action element in the policy is set to es:*, which means it allows all Amazon OpenSearch Service actions. + access_policies = jsonencode({ + Version = "2012-10-17" + Statement = [ + { + Effect = "Allow" + Principal = "*" + Action = "es:*" + Resource = "arn:aws:es:us-east-2:${data.aws_caller_identity.current.account_id}:domain/${var.domain_name}/*" + } + ] + }) + + + ebs_options { + ebs_enabled = true + volume_size = 360 + } + + + domain_endpoint_options { + enforce_https = false + tls_security_policy = "Policy-Min-TLS-1-2-2019-07" + } + + node_to_node_encryption { + enabled = true + } + + vpc_options { + subnet_ids = [ + data.terraform_remote_state.shared_resources.outputs.subnet_public_id, + ] + + security_group_ids = ["${data.terraform_remote_state.shared_resources.outputs.performance_cto_sg_id}"] + } + + + tags = { + Domain = var.domain_name + Name = "vector-benchmark-opensearch-v2-11" + Project = "Vector-Competitive-OpenSearch" + } +} diff --git a/terraform/opensearch-v2.11-r6g.2xlarge-search-domain1/output.tf b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain1/output.tf new file mode 100644 index 0000000..7686557 --- /dev/null +++ b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain1/output.tf @@ -0,0 +1,5 @@ + +# output "primary_endpoint_address" { +# sensitive = true +# value = ["${module.cluster}"] +# } diff --git a/terraform/opensearch-v2.11-r6g.2xlarge-search-domain1/shared_resources.tf b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain1/shared_resources.tf new file mode 100644 index 0000000..824e6b9 --- /dev/null +++ b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain1/shared_resources.tf @@ -0,0 +1,17 @@ +# provider +provider "aws" { + region = var.region +} + +################################################################################ +# This is the shared resources bucket key -- you will need it across environments like security rules,etc... +# !! do not change this !! +################################################################################ +data "terraform_remote_state" "shared_resources" { + backend = "s3" + config = { + bucket = "performance-cto-group" + key = "benchmarks/infrastructure/shared_resources.tfstate" + region = "us-east-1" + } +} diff --git a/terraform/opensearch-v2.11-r6g.2xlarge-search-domain1/variables.tf b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain1/variables.tf new file mode 100644 index 0000000..0a84a53 --- /dev/null +++ b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain1/variables.tf @@ -0,0 +1,5 @@ + + +variable "region" { + default = "us-east-2" +} diff --git a/terraform/opensearch-v2.11-r6g.2xlarge-search-domain2/common.tf b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain2/common.tf new file mode 100644 index 0000000..10568c1 --- /dev/null +++ b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain2/common.tf @@ -0,0 +1,11 @@ + +################################################################################ +# This is the bucket holding this specific setup tfstate +################################################################################ +terraform { + backend "s3" { + bucket = "performance-cto-group" + region = "us-east-1" + } +} + diff --git a/terraform/opensearch-v2.11-r6g.2xlarge-search-domain2/db.tf b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain2/db.tf new file mode 100644 index 0000000..037ce36 --- /dev/null +++ b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain2/db.tf @@ -0,0 +1,75 @@ +variable "domain_name" { + description = "The name of the OpenSearch domain" + type = string + default = "vector-benchmark-d2" # You can override this value during `terraform apply` +} + + +data "aws_caller_identity" "current" {} + +resource "aws_opensearch_domain" "example" { + domain_name = var.domain_name + engine_version = "OpenSearch_2.11" + + cluster_config { + instance_type = "r6g.2xlarge.search" + } + + advanced_security_options { + enabled = false + anonymous_auth_enabled = true + internal_user_database_enabled = true + master_user_options { + master_user_name = "opensearch" + master_user_password = "Performance2025#" + } + } + + encrypt_at_rest { + enabled = true + } + + # The Action element in the policy is set to es:*, which means it allows all Amazon OpenSearch Service actions. + access_policies = jsonencode({ + Version = "2012-10-17" + Statement = [ + { + Effect = "Allow" + Principal = "*" + Action = "es:*" + Resource = "arn:aws:es:us-east-2:${data.aws_caller_identity.current.account_id}:domain/${var.domain_name}/*" + } + ] + }) + + + ebs_options { + ebs_enabled = true + volume_size = 360 + } + + + domain_endpoint_options { + enforce_https = false + tls_security_policy = "Policy-Min-TLS-1-2-2019-07" + } + + node_to_node_encryption { + enabled = true + } + + vpc_options { + subnet_ids = [ + data.terraform_remote_state.shared_resources.outputs.subnet_public_id, + ] + + security_group_ids = ["${data.terraform_remote_state.shared_resources.outputs.performance_cto_sg_id}"] + } + + + tags = { + Domain = var.domain_name + Name = "vector-benchmark-opensearch-v2-11" + Project = "Vector-Competitive-OpenSearch" + } +} diff --git a/terraform/opensearch-v2.11-r6g.2xlarge-search-domain2/output.tf b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain2/output.tf new file mode 100644 index 0000000..7686557 --- /dev/null +++ b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain2/output.tf @@ -0,0 +1,5 @@ + +# output "primary_endpoint_address" { +# sensitive = true +# value = ["${module.cluster}"] +# } diff --git a/terraform/opensearch-v2.11-r6g.2xlarge-search-domain2/shared_resources.tf b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain2/shared_resources.tf new file mode 100644 index 0000000..824e6b9 --- /dev/null +++ b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain2/shared_resources.tf @@ -0,0 +1,17 @@ +# provider +provider "aws" { + region = var.region +} + +################################################################################ +# This is the shared resources bucket key -- you will need it across environments like security rules,etc... +# !! do not change this !! +################################################################################ +data "terraform_remote_state" "shared_resources" { + backend = "s3" + config = { + bucket = "performance-cto-group" + key = "benchmarks/infrastructure/shared_resources.tfstate" + region = "us-east-1" + } +} diff --git a/terraform/opensearch-v2.11-r6g.2xlarge-search-domain2/variables.tf b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain2/variables.tf new file mode 100644 index 0000000..0a84a53 --- /dev/null +++ b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain2/variables.tf @@ -0,0 +1,5 @@ + + +variable "region" { + default = "us-east-2" +} diff --git a/terraform/opensearch-v2.11-r6g.2xlarge-search-domain3/common.tf b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain3/common.tf new file mode 100644 index 0000000..10568c1 --- /dev/null +++ b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain3/common.tf @@ -0,0 +1,11 @@ + +################################################################################ +# This is the bucket holding this specific setup tfstate +################################################################################ +terraform { + backend "s3" { + bucket = "performance-cto-group" + region = "us-east-1" + } +} + diff --git a/terraform/opensearch-v2.11-r6g.2xlarge-search-domain3/db.tf b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain3/db.tf new file mode 100644 index 0000000..d018902 --- /dev/null +++ b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain3/db.tf @@ -0,0 +1,75 @@ +variable "domain_name" { + description = "The name of the OpenSearch domain" + type = string + default = "vector-benchmark-d3" # You can override this value during `terraform apply` +} + + +data "aws_caller_identity" "current" {} + +resource "aws_opensearch_domain" "example" { + domain_name = var.domain_name + engine_version = "OpenSearch_2.11" + + cluster_config { + instance_type = "r6g.2xlarge.search" + } + + advanced_security_options { + enabled = false + anonymous_auth_enabled = true + internal_user_database_enabled = true + master_user_options { + master_user_name = "opensearch" + master_user_password = "Performance2025#" + } + } + + encrypt_at_rest { + enabled = true + } + + # The Action element in the policy is set to es:*, which means it allows all Amazon OpenSearch Service actions. + access_policies = jsonencode({ + Version = "2012-10-17" + Statement = [ + { + Effect = "Allow" + Principal = "*" + Action = "es:*" + Resource = "arn:aws:es:us-east-2:${data.aws_caller_identity.current.account_id}:domain/${var.domain_name}/*" + } + ] + }) + + + ebs_options { + ebs_enabled = true + volume_size = 360 + } + + + domain_endpoint_options { + enforce_https = false + tls_security_policy = "Policy-Min-TLS-1-2-2019-07" + } + + node_to_node_encryption { + enabled = true + } + + vpc_options { + subnet_ids = [ + data.terraform_remote_state.shared_resources.outputs.subnet_public_id, + ] + + security_group_ids = ["${data.terraform_remote_state.shared_resources.outputs.performance_cto_sg_id}"] + } + + + tags = { + Domain = var.domain_name + Name = "vector-benchmark-opensearch-v2-11" + Project = "Vector-Competitive-OpenSearch" + } +} diff --git a/terraform/opensearch-v2.11-r6g.2xlarge-search-domain3/output.tf b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain3/output.tf new file mode 100644 index 0000000..7686557 --- /dev/null +++ b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain3/output.tf @@ -0,0 +1,5 @@ + +# output "primary_endpoint_address" { +# sensitive = true +# value = ["${module.cluster}"] +# } diff --git a/terraform/opensearch-v2.11-r6g.2xlarge-search-domain3/shared_resources.tf b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain3/shared_resources.tf new file mode 100644 index 0000000..824e6b9 --- /dev/null +++ b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain3/shared_resources.tf @@ -0,0 +1,17 @@ +# provider +provider "aws" { + region = var.region +} + +################################################################################ +# This is the shared resources bucket key -- you will need it across environments like security rules,etc... +# !! do not change this !! +################################################################################ +data "terraform_remote_state" "shared_resources" { + backend = "s3" + config = { + bucket = "performance-cto-group" + key = "benchmarks/infrastructure/shared_resources.tfstate" + region = "us-east-1" + } +} diff --git a/terraform/opensearch-v2.11-r6g.2xlarge-search-domain3/variables.tf b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain3/variables.tf new file mode 100644 index 0000000..0a84a53 --- /dev/null +++ b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain3/variables.tf @@ -0,0 +1,5 @@ + + +variable "region" { + default = "us-east-2" +} diff --git a/terraform/opensearch-v2.11-r6g.2xlarge-search-domain4/common.tf b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain4/common.tf new file mode 100644 index 0000000..10568c1 --- /dev/null +++ b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain4/common.tf @@ -0,0 +1,11 @@ + +################################################################################ +# This is the bucket holding this specific setup tfstate +################################################################################ +terraform { + backend "s3" { + bucket = "performance-cto-group" + region = "us-east-1" + } +} + diff --git a/terraform/opensearch-v2.11-r6g.2xlarge-search-domain4/db.tf b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain4/db.tf new file mode 100644 index 0000000..c3e8e8f --- /dev/null +++ b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain4/db.tf @@ -0,0 +1,75 @@ +variable "domain_name" { + description = "The name of the OpenSearch domain" + type = string + default = "vector-benchmark-d4" # You can override this value during `terraform apply` +} + + +data "aws_caller_identity" "current" {} + +resource "aws_opensearch_domain" "example" { + domain_name = var.domain_name + engine_version = "OpenSearch_2.11" + + cluster_config { + instance_type = "r6g.2xlarge.search" + } + + advanced_security_options { + enabled = false + anonymous_auth_enabled = true + internal_user_database_enabled = true + master_user_options { + master_user_name = "opensearch" + master_user_password = "Performance2025#" + } + } + + encrypt_at_rest { + enabled = true + } + + # The Action element in the policy is set to es:*, which means it allows all Amazon OpenSearch Service actions. + access_policies = jsonencode({ + Version = "2012-10-17" + Statement = [ + { + Effect = "Allow" + Principal = "*" + Action = "es:*" + Resource = "arn:aws:es:us-east-2:${data.aws_caller_identity.current.account_id}:domain/${var.domain_name}/*" + } + ] + }) + + + ebs_options { + ebs_enabled = true + volume_size = 360 + } + + + domain_endpoint_options { + enforce_https = false + tls_security_policy = "Policy-Min-TLS-1-2-2019-07" + } + + node_to_node_encryption { + enabled = true + } + + vpc_options { + subnet_ids = [ + data.terraform_remote_state.shared_resources.outputs.subnet_public_id, + ] + + security_group_ids = ["${data.terraform_remote_state.shared_resources.outputs.performance_cto_sg_id}"] + } + + + tags = { + Domain = var.domain_name + Name = "vector-benchmark-opensearch-v2-11" + Project = "Vector-Competitive-OpenSearch" + } +} diff --git a/terraform/opensearch-v2.11-r6g.2xlarge-search-domain4/output.tf b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain4/output.tf new file mode 100644 index 0000000..7686557 --- /dev/null +++ b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain4/output.tf @@ -0,0 +1,5 @@ + +# output "primary_endpoint_address" { +# sensitive = true +# value = ["${module.cluster}"] +# } diff --git a/terraform/opensearch-v2.11-r6g.2xlarge-search-domain4/shared_resources.tf b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain4/shared_resources.tf new file mode 100644 index 0000000..824e6b9 --- /dev/null +++ b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain4/shared_resources.tf @@ -0,0 +1,17 @@ +# provider +provider "aws" { + region = var.region +} + +################################################################################ +# This is the shared resources bucket key -- you will need it across environments like security rules,etc... +# !! do not change this !! +################################################################################ +data "terraform_remote_state" "shared_resources" { + backend = "s3" + config = { + bucket = "performance-cto-group" + key = "benchmarks/infrastructure/shared_resources.tfstate" + region = "us-east-1" + } +} diff --git a/terraform/opensearch-v2.11-r6g.2xlarge-search-domain4/variables.tf b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain4/variables.tf new file mode 100644 index 0000000..0a84a53 --- /dev/null +++ b/terraform/opensearch-v2.11-r6g.2xlarge-search-domain4/variables.tf @@ -0,0 +1,5 @@ + + +variable "region" { + default = "us-east-2" +}