oci_fleet_apps_management_fleet

This resource provides the Fleet resource in Oracle Cloud Infrastructure Fleet Apps Management service.

Create a product, environment, group, or generic type of fleet in Fleet Application Management.

Example Usage

resource "oci_fleet_apps_management_fleet" "test_fleet" {
	#Required
	compartment_id = var.compartment_id
	fleet_type = var.fleet_fleet_type

	#Optional
	application_type = var.fleet_application_type
	credentials {
		#Required
		compartment_id = var.compartment_id
		display_name = var.fleet_credentials_display_name
		entity_specifics {
			#Required
			credential_level = var.fleet_credentials_entity_specifics_credential_level

			#Optional
			resource_id = oci_cloud_guard_resource.test_resource.id
			target = var.fleet_credentials_entity_specifics_target
			variables {

				#Optional
				name = var.fleet_credentials_entity_specifics_variables_name
				value = var.fleet_credentials_entity_specifics_variables_value
			}
		}
		password {
			#Required
			credential_type = var.fleet_credentials_password_credential_type

			#Optional
			key_id = oci_kms_key.test_key.id
			key_version = var.fleet_credentials_password_key_version
			secret_id = oci_vault_secret.test_secret.id
			secret_version = var.fleet_credentials_password_secret_version
			value = var.fleet_credentials_password_value
			vault_id = oci_kms_vault.test_vault.id
		}
		user {
			#Required
			credential_type = var.fleet_credentials_user_credential_type

			#Optional
			key_id = oci_kms_key.test_key.id
			key_version = var.fleet_credentials_user_key_version
			secret_id = oci_vault_secret.test_secret.id
			secret_version = var.fleet_credentials_user_secret_version
			value = var.fleet_credentials_user_value
			vault_id = oci_kms_vault.test_vault.id
		}
	}
	defined_tags = {"foo-namespace.bar-key"= "value"}
	description = var.fleet_description
	display_name = var.fleet_display_name
	environment_type = var.fleet_environment_type
	freeform_tags = {"bar-key"= "value"}
	group_type = var.fleet_group_type
	is_target_auto_confirm = var.fleet_is_target_auto_confirm
	notification_preferences {
		#Required
		compartment_id = var.compartment_id
		topic_id = oci_ons_notification_topic.test_notification_topic.id

		#Optional
		preferences {

			#Optional
			on_job_failure = var.fleet_notification_preferences_preferences_on_job_failure
			on_topology_modification = var.fleet_notification_preferences_preferences_on_topology_modification
			on_upcoming_schedule = var.fleet_notification_preferences_preferences_on_upcoming_schedule
		}
	}
	products = var.fleet_products
	resource_selection_type = var.fleet_resource_selection_type
	resources {
		#Required
		compartment_id = var.compartment_id
		resource_id = oci_cloud_guard_resource.test_resource.id
		tenancy_id = oci_identity_tenancy.test_tenancy.id

		#Optional
		fleet_resource_type = var.fleet_resources_fleet_resource_type
	}
	rule_selection_criteria {
		#Required
		match_condition = var.fleet_rule_selection_criteria_match_condition
		rules {
			#Required
			compartment_id = var.compartment_id
			conditions {
				#Required
				attr_group = var.fleet_rule_selection_criteria_rules_conditions_attr_group
				attr_key = var.fleet_rule_selection_criteria_rules_conditions_attr_key
				attr_value = var.fleet_rule_selection_criteria_rules_conditions_attr_value
			}
			resource_compartment_id = oci_identity_compartment.test_compartment.id

			#Optional
			basis = var.fleet_rule_selection_criteria_rules_basis
		}
	}
}

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 Fleet * update - (Defaults to 20 minutes), when updating the Fleet * delete - (Defaults to 20 minutes), when destroying the Fleet

Import

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

$ terraform import oci_fleet_apps_management_fleet.test_fleet "id"