oci_opensearch_opensearch_cluster

This resource provides the Opensearch Cluster resource in Oracle Cloud Infrastructure Opensearch service.

Creates a new OpensearchCluster.

Prerequisites

The below policies must be created in compartment before creating OpensearchCluster

{Compartment-Name} - Name of your compartment
Allow service opensearch to manage vnics in compartment {Compartment-Name}
Allow service opensearch to use subnets in compartment {Compartment-Name}
Allow service opensearch to use network-security-groups in compartment {Compartment-Name}
Allow service opensearch to manage vcns in compartment {Compartment-Name}

For latest documentation on OpenSearch use please refer to https://docs.oracle.com/en-us/iaas/Content/search-opensearch/home.htm
Required permissions: https://docs.oracle.com/en-us/iaas/Content/search-opensearch/Concepts/ocisearchpermissions.htm

Example Usage

resource "oci_opensearch_opensearch_cluster" "test_opensearch_cluster" {
	#Required
	compartment_id = var.compartment_id
	data_node_count = var.opensearch_cluster_data_node_count
	data_node_host_memory_gb = var.opensearch_cluster_data_node_host_memory_gb
	data_node_host_ocpu_count = var.opensearch_cluster_data_node_host_ocpu_count
	data_node_host_type = var.opensearch_cluster_data_node_host_type
	data_node_storage_gb = var.opensearch_cluster_data_node_storage_gb
	display_name = var.opensearch_cluster_display_name
	master_node_count = var.opensearch_cluster_master_node_count
	master_node_host_memory_gb = var.opensearch_cluster_master_node_host_memory_gb
	master_node_host_ocpu_count = var.opensearch_cluster_master_node_host_ocpu_count
	master_node_host_type = var.opensearch_cluster_master_node_host_type
	opendashboard_node_count = var.opensearch_cluster_opendashboard_node_count
	opendashboard_node_host_memory_gb = var.opensearch_cluster_opendashboard_node_host_memory_gb
	opendashboard_node_host_ocpu_count = var.opensearch_cluster_opendashboard_node_host_ocpu_count
	software_version = var.opensearch_cluster_software_version
	subnet_compartment_id = oci_identity_compartment.test_compartment.id
	subnet_id = oci_core_subnet.test_subnet.id
	vcn_compartment_id = oci_identity_compartment.test_compartment.id
	vcn_id = oci_core_vcn.test_vcn.id

	#Optional
	data_node_host_bare_metal_shape = var.opensearch_cluster_data_node_host_bare_metal_shape
	defined_tags = {"foo-namespace.bar-key"= "value"}
	freeform_tags = {"bar-key"= "value"}
	master_node_host_bare_metal_shape = var.opensearch_cluster_master_node_host_bare_metal_shape
	security_master_user_name = oci_identity_user.test_user.name
	security_master_user_password_hash = var.opensearch_cluster_security_master_user_password_hash
	security_mode = var.opensearch_cluster_security_mode
	system_tags = var.opensearch_cluster_system_tags
}

Argument Reference

The following arguments are supported:

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

Attributes Reference

The following attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain operations: * create - (Defaults to 45 minutes), when creating the Opensearch Cluster * update - (Defaults to 45 minutes), when updating the Opensearch Cluster * delete - (Defaults to 45 minutes), when destroying the Opensearch Cluster

Import

OpensearchClusters can be imported using the id, e.g.

$ terraform import oci_opensearch_opensearch_cluster.test_opensearch_cluster "id"