oci_dif_stack

This resource provides the Stack resource in Oracle Cloud Infrastructure Dif service.

Creates a Stack.

Example Usage

resource "oci_dif_stack" "test_stack" {
	#Required
	compartment_id = var.compartment_id
	display_name = var.stack_display_name
	services = var.stack_services
	stack_templates = var.stack_stack_templates

	#Optional
	adb {
		#Required
		admin_password_id = oci_dif_admin_password.test_admin_password.id
		data_storage_size_in_tbs = var.stack_adb_data_storage_size_in_tbs
		db_version = var.stack_adb_db_version
		db_workload = var.stack_adb_db_workload
		ecpu = var.stack_adb_ecpu
		instance_id = var.stack_adb_instance_id

		#Optional
		is_mtls_connection_required = var.stack_adb_is_mtls_connection_required
		is_public = var.stack_adb_is_public
		subnet_id = oci_core_subnet.test_subnet.id
		tools_public_access = var.stack_adb_tools_public_access
		
		#Deploy Artifact fields
		artifact_object_storage_path = var.stack_adb_artifact_object_storage_path
		db_credentials {
			user_name = var.stack_adb_db_credentials_user_name
			secret_id = var.stack_adb_db_credentials_secret_id
			user_type = var.stack_adb_db_credentials_user_type
		}
	}
	dataflow {
		#Required
		driver_shape = var.stack_dataflow_driver_shape
		executor_shape = var.stack_dataflow_executor_shape
		instance_id = var.stack_dataflow_instance_id
		log_bucket_instance_id = var.stack_objectstorage_instance_id
		num_executors = var.stack_dataflow_num_executors
		spark_version = var.stack_dataflow_spark_version

		#Optional
		connections {
			#Required
			connection_details {

				#Optional
				dif_dependencies {
					#Required
					service_instance_id = var.stack_dependency_instance_id
					service_type = var.stack_dataflow_connections_connection_details_dif_dependencies_service_type
				}
				domain_names = var.stack_dataflow_connections_connection_details_domain_names
			}
			subnet_id = oci_core_subnet.test_subnet.id
		}
		driver_shape_config {
			#Required
			memory_in_gbs = var.stack_dataflow_driver_shape_config_memory_in_gbs
			ocpus = var.stack_dataflow_driver_shape_config_ocpus
		}
		executor_shape_config {
			#Required
			memory_in_gbs = var.stack_dataflow_executor_shape_config_memory_in_gbs
			ocpus = var.stack_dataflow_executor_shape_config_ocpus
		}
		private_endpoint_id = oci_dataflow_private_endpoint.test_private_endpoint.id
		warehouse_bucket_instance_id = var.stack_objectstorage_instance_id

		#Deploy Artifact fields
		execute = var.stack_dataflow_execute
		archive_uri = var.stack_dataflow_archive_uri
	}
	defined_tags = {"Operations.CostCenter"= "42"}
	freeform_tags = {"Department"= "Finance"}
	genai {
		#Required
		base_model = var.stack_genai_base_model
		cluster_type = var.stack_genai_cluster_type
		instance_id = var.stack_genai_instance_id
		oci_region = var.stack_genai_oci_region
		unit_count = var.stack_genai_unit_count

		#Optional
		endpoints {
			#Required
			endpoint_name = var.stack_genai_endpoint_name
			is_content_moderation_enabled = var.stack_genai_endpoints_is_content_moderation_enabled
		}
	}
	ggcs {
		#Required
		instance_id = var.stack_ggcs_instance_id
		ocpu = var.stack_ggcs_ocpu
		password_secret_id = oci_vault_secret.test_secret.id
		subnet_id = oci_core_subnet.test_subnet.id

		#Optional
		connections {
			#Required
			connection_name = oci_golden_gate_connection.test_connection.name

			#Optional
			connection_id = oci_golden_gate_connection.test_connection.id
			dif_dependencies {
				#Required
				service_instance_id = var.stack_dependency_instance_id
				service_type = var.stack_ggcs_connections_dif_dependencies_service_type
			}
			gg_admin_secret_id = oci_vault_secret.test_secret.id
		}
		ogg_version = var.stack_ggcs_ogg_version
		public_subnet_id = oci_core_subnet.test_subnet.id

		#Deploy Artifact fields
		artifact_object_storage_path = var.stack_ggcs_artifact_object_storage_path
		users {
			user_name = var.stack_ggcs_users_user_name
			secret_id = var.stack_ggcs_users_secret_id
			user_type = var.stack_ggcs_users_user_type
			action = var.stack_ggcs_users_action
		}
		sources {
			source_id = var.stack_ggcs_sources_source_id
			action = var.stack_ggcs_sources_action
			should_start_source_operations = var.stack_ggcs_sources_should_start_source_operations
			target_uri = var.stack_ggcs_sources_target_uri
			target_connection_name = var.stack_ggcs_sources_target_connection_name
		}
		targets {
			target_id = var.stack_ggcs_target_id
			action = var.stack_ggcs_action
			should_start_target_operations = var.stack_ggcs_should_start_target_operations
			source_uri = var.stack_ggcs_source_uri
			source_connection_name = var.stack_ggcs_source_connection_name
		}
	}
	notification_email = var.stack_notification_email
	objectstorage {
		#Required
		instance_id = var.stack_objectstorage_instance_id
		object_versioning = var.stack_objectstorage_object_versioning
		storage_tier = var.stack_objectstorage_storage_tier

		#Optional
		auto_tiering = var.stack_objectstorage_auto_tiering
	}
	subnet_id = var.stack_deploy_artifacts_subnet_id
}

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. - Single-operation per apply: exactly one of the following is allowed in a single terraform apply: - Add service (increase add_service_trigger) - Deploy artifacts (increase deploy_artifacts_trigger) - Change compartment (update compartment_id) - Standard update (all other updatable fields such as tags, service block parameters, etc.) Mixing any two or more in the same plan/apply is not allowed and will result in a provider error. Split your changes across separate applies. - Additions to services/templates or service blocks require increasing add_service_trigger. Deletions are not permitted.

Attributes Reference

The following attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain operations: * create - (Defaults to 12 hours), when creating the Stack * update - (Defaults to 12 hours), when updating the Stack * delete - (Defaults to 12 hours), when destroying the Stack