oci_fleet_apps_management_fleet

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

Create a fleet in Fleet Application Management.

Example Usage

resource "oci_fleet_apps_management_fleet" "test_fleet" {
	#Required
	compartment_id = var.compartment_id
	display_name = var.fleet_display_name
	resource_selection {
		#Required
		resource_selection_type = var.fleet_resource_selection_resource_selection_type

		#Optional
		rule_selection_criteria {

			#Optional
			match_condition = var.fleet_resource_selection_rule_selection_criteria_match_condition
			rules {

				#Optional
				basis = var.fleet_resource_selection_rule_selection_criteria_rules_basis
				compartment_id = var.compartment_id
				conditions {

					#Optional
					attr_group = var.fleet_resource_selection_rule_selection_criteria_rules_conditions_attr_group
					attr_key = var.fleet_resource_selection_rule_selection_criteria_rules_conditions_attr_key
					attr_value = var.fleet_resource_selection_rule_selection_criteria_rules_conditions_attr_value
				}
				resource_compartment_id = oci_identity_compartment.test_compartment.id
			}
		}
	}

	#Optional
	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
	details {

		#Optional
		fleet_type = var.fleet_details_fleet_type
	}
	environment_type = var.fleet_environment_type
	freeform_tags = {"bar-key"= "value"}
	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_resource_non_compliance = var.fleet_notification_preferences_preferences_on_resource_non_compliance
			on_runbook_newer_version = var.fleet_notification_preferences_preferences_on_runbook_newer_version
			on_task_failure = var.fleet_notification_preferences_preferences_on_task_failure
			on_task_pause = var.fleet_notification_preferences_preferences_on_task_pause
			on_task_success = var.fleet_notification_preferences_preferences_on_task_success
			on_topology_modification = var.fleet_notification_preferences_preferences_on_topology_modification
			upcoming_schedule {

				#Optional
				notify_before = var.fleet_notification_preferences_preferences_upcoming_schedule_notify_before
				on_upcoming_schedule = var.fleet_notification_preferences_preferences_upcoming_schedule_on_upcoming_schedule
			}
		}
	}
	parent_fleet_id = oci_fleet_apps_management_fleet.test_fleet.id
	products = var.fleet_products
	properties {
		#Required
		compartment_id = var.compartment_id
		fleet_property_type = var.fleet_properties_fleet_property_type

		#Optional
		display_name = var.fleet_properties_display_name
		is_required = var.fleet_properties_is_required
		value = var.fleet_properties_value
	}
	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
	}
}

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"