oci_generative_ai_hosted_application

This resource provides the Hosted Application resource in Oracle Cloud Infrastructure Generative AI service. Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/generative-ai/latest/HostedApplication

Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/generative_ai

Creates a hosted application.

Example Usage

resource "oci_generative_ai_hosted_application" "test_hosted_application" {
	#Required
	compartment_id = var.compartment_id
	display_name = var.hosted_application_display_name

	#Optional
	defined_tags = {"Operations.CostCenter"= "42"}
	description = var.hosted_application_description
	environment_variables {
		#Required
		name = var.hosted_application_environment_variables_name
		type = var.hosted_application_environment_variables_type
		value = var.hosted_application_environment_variables_value
	}
	freeform_tags = {"Department"= "Finance"}
	inbound_auth_config {
		#Required
		inbound_auth_config_type = var.hosted_application_inbound_auth_config_inbound_auth_config_type

		#Optional
		idcs_config {
			#Required
			domain_url = var.hosted_application_inbound_auth_config_idcs_config_domain_url
			scope = var.hosted_application_inbound_auth_config_idcs_config_scope

			#Optional
			audience = var.hosted_application_inbound_auth_config_idcs_config_audience
		}
	}
	networking_config {
		#Required
		inbound_networking_config {
			#Required
			endpoint_mode = var.hosted_application_networking_config_inbound_networking_config_endpoint_mode

			#Optional
			private_endpoint_id = oci_generative_ai_generative_ai_private_endpoint.test_generative_ai_private_endpoint.id
		}
		outbound_networking_config {
			#Required
			network_mode = var.hosted_application_networking_config_outbound_networking_config_network_mode

			#Optional
			custom_subnet_id = oci_core_subnet.test_subnet.id
			nsg_ids = var.hosted_application_networking_config_outbound_networking_config_nsg_ids
		}
	}
	scaling_config {
		#Required
		scaling_type = var.hosted_application_scaling_config_scaling_type

		#Optional
		max_replica = var.hosted_application_scaling_config_max_replica
		min_replica = var.hosted_application_scaling_config_min_replica
		target_concurrency_threshold = var.hosted_application_scaling_config_target_concurrency_threshold
		target_cpu_threshold = var.hosted_application_scaling_config_target_cpu_threshold
		target_memory_threshold = var.hosted_application_scaling_config_target_memory_threshold
		target_rps_threshold = var.hosted_application_scaling_config_target_rps_threshold
	}
	storage_configs {
		#Required
		environment_variable_key = var.hosted_application_storage_configs_environment_variable_key
		storage_id = oci_generative_ai_storage.test_storage.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

Attributes Reference

The following attributes are exported:

Timeouts

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

Import

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

$ terraform import oci_generative_ai_hosted_application.test_hosted_application "id"