clusternest_opensearch (Resource)
Example Usage
resource "clusternest_opensearch" "test" {
name = "logs"
tier = "standard"
organization_id = 123
}
data "clusternest_opensearch_credentials" "test" {
cluster_id = clusternest_opensearch.test.id
}
output "opensearch_url" {
value = clusternest_opensearch.test.opensearch_url
}
output "username" {
value = data.clusternest_opensearch_credentials.test.username
}
output "password" {
value = data.clusternest_opensearch_credentials.test.password
sensitive = true
}
Schema
Required
name(String) Cluster name, unique within the organization. Lowercase letters, digits, and hyphens only.organization_id(Number) Organization the cluster is created in.
Optional
auth_type(String) Authentication backend for the cluster - OpenSearch's own internal user database, or delegated to an external OIDC or SAML identity provider.data_node_count(Number) Number of data nodes in the cluster. Only Advanced tier supports more than 2 data nodes upto a maximum of 10.maintenance_window(Attributes) (see below for nested schema)oidc_config(Attributes) (see below for nested schema)opensearch_custom_hostname(String)opensearch_dashboards_custom_hostname(String)opensearch_dashboards_whitelist(List of String)opensearch_whitelist(List of String)repo_config(Attributes) (see below for nested schema)saml_config(Attributes) (see below for nested schema)tier(String) Sizing/pricing tier the cluster runs at.version(String) OpenSearch version to run.
Read-Only
id(Number) Unique identifier of the cluster.opensearch_dashboards_url(String)opensearch_url(String)
Nested Schema for maintenance_window
Required:
day_of_week(String) Day of the week the window recurs on, UTC.end_time(String) Before start_time means the window wraps past midnight into the next day (e.g. start_time='23:00', end_time='01:00' is a 2-hour window). Equal to start_time means the full 24 hours are available on day_of_week - distinct from leaving maintenance_window unset entirely, which means every day, any time.start_time(String) Start of the window, 24h "HH:MM", UTC.
Nested Schema for oidc_config
Required:
client_id(String) OAuth client ID registered with the identity provider.connect_url(String) OpenID Connect discovery/well-known endpoint of the identity provider.
Optional:
client_secret(String, Sensitive)logout_url(String)roles_key(String) Claim in the ID token to map to OpenSearch roles.scope(String) Space-separated OAuth scopes to request during login.subject_key(String) Claim in the ID token to use as the OpenSearch username.
Nested Schema for repo_config
Optional:
access_key_id(String)enable_access_keys(Boolean) Authenticate snapshot backups to S3 via static access keys instead of an IAM role.enable_iam_role(Boolean) Authenticate snapshot backups to S3 via an IAM role instead of static access keys.secret_access_key(String, Sensitive)
Read-Only:
aws_role_arn(String)
Nested Schema for saml_config
Required:
idp_entity_id(String) Entity ID of the identity provider.idp_metadata_url(String) URL of the identity provider's SAML metadata document.sp_entity_id(String) Entity ID this OpenSearch cluster identifies itself as to the identity provider.
Optional:
roles_key(String) SAML attribute to map to OpenSearch roles.subject_key(String)