oci_apm_synthetics_monitor

This resource provides the Monitor resource in Oracle Cloud Infrastructure Apm Synthetics service.

Creates a new monitor.

Example Usage

resource "oci_apm_synthetics_monitor" "test_monitor" {
	#Required
	apm_domain_id = oci_apm_synthetics_apm_domain.test_apm_domain.id
	display_name = var.monitor_display_name
	monitor_type = var.monitor_monitor_type
	repeat_interval_in_seconds = var.monitor_repeat_interval_in_seconds
        vantage_points {
          #Required
          name  = var.monitor_vantage_points_name
          #Optional
          display_name = var.monitor_vantage_points_param_display_name
        }

	#Optional
	availability_configuration {

		#Optional
		max_allowed_failures_per_interval = var.monitor_availability_configuration_max_allowed_failures_per_interval
		min_allowed_runs_per_interval = var.monitor_availability_configuration_min_allowed_runs_per_interval
	}
	batch_interval_in_seconds = var.monitor_batch_interval_in_seconds
	configuration {

		#Optional
		client_certificate_details {

			#Optional
			client_certificate {

				#Optional
				content = var.monitor_configuration_client_certificate_details_client_certificate_content
				file_name = var.monitor_configuration_client_certificate_details_client_certificate_file_name
			}
			private_key {

				#Optional
				content = var.monitor_configuration_client_certificate_details_private_key_content
				file_name = var.monitor_configuration_client_certificate_details_private_key_file_name
			}
		}
		config_type = var.monitor_configuration_config_type
		connection_string = var.monitor_configuration_connection_string
		database_authentication_details {

			#Optional
			password {

				#Optional
				password = var.monitor_configuration_database_authentication_details_password_password
				password_type = var.monitor_configuration_database_authentication_details_password_password_type
				vault_secret_id = oci_vault_secret.test_secret.id
			}
			username = var.monitor_configuration_database_authentication_details_username
		}
		database_connection_type = var.monitor_configuration_database_connection_type
		database_role = var.monitor_configuration_database_role
		database_type = var.monitor_configuration_database_type
		database_wallet_details {

			#Optional
			database_wallet = var.monitor_configuration_database_wallet_details_database_wallet
			service_name = oci_core_service.test_service.name
		}
		dns_configuration {

			#Optional
			is_override_dns = var.monitor_configuration_dns_configuration_is_override_dns
			override_dns_ip = var.monitor_configuration_dns_configuration_override_dns_ip
		}
		download_size_limit_in_bytes = var.monitor_configuration_download_size_limit_in_bytes
		ftp_basic_authentication_details {

			#Optional
			password {

				#Optional
				password = var.monitor_configuration_ftp_basic_authentication_details_password_password
				password_type = var.monitor_configuration_ftp_basic_authentication_details_password_password_type
				vault_secret_id = oci_vault_secret.test_secret.id
			}
			username = var.monitor_configuration_ftp_basic_authentication_details_username
		}
		ftp_protocol = var.monitor_configuration_ftp_protocol
		ftp_request_type = var.monitor_configuration_ftp_request_type
		is_active_mode = var.monitor_configuration_is_active_mode
		is_certificate_validation_enabled = var.monitor_configuration_is_certificate_validation_enabled
		is_default_snapshot_enabled = var.monitor_configuration_is_default_snapshot_enabled
		is_failure_retried = var.monitor_configuration_is_failure_retried
		is_query_recursive = var.monitor_configuration_is_query_recursive
		is_redirection_enabled = var.monitor_configuration_is_redirection_enabled
		name_server = var.monitor_configuration_name_server
		network_configuration {

			#Optional
			number_of_hops = var.monitor_configuration_network_configuration_number_of_hops
			probe_mode = var.monitor_configuration_network_configuration_probe_mode
			probe_per_hop = var.monitor_configuration_network_configuration_probe_per_hop
			protocol = var.monitor_configuration_network_configuration_protocol
			transmission_rate = var.monitor_configuration_network_configuration_transmission_rate
		}
		protocol = var.monitor_configuration_protocol
		query = var.monitor_configuration_query
		record_type = var.monitor_configuration_record_type
		req_authentication_details {

			#Optional
			auth_headers {

				#Optional
				header_name = var.monitor_configuration_req_authentication_details_auth_headers_header_name
				header_value = var.monitor_configuration_req_authentication_details_auth_headers_header_value
			}
			auth_request_method = var.monitor_configuration_req_authentication_details_auth_request_method
			auth_request_post_body = var.monitor_configuration_req_authentication_details_auth_request_post_body
			auth_token = var.monitor_configuration_req_authentication_details_auth_token
			auth_url = var.monitor_configuration_req_authentication_details_auth_url
			auth_user_name = oci_identity_user.test_user.name
			auth_user_password = var.monitor_configuration_req_authentication_details_auth_user_password
			oauth_scheme = var.monitor_configuration_req_authentication_details_oauth_scheme
		}
		req_authentication_scheme = var.monitor_configuration_req_authentication_scheme
		request_headers {

			#Optional
			header_name = var.monitor_configuration_request_headers_header_name
			header_value = var.monitor_configuration_request_headers_header_value
		}
		request_method = var.monitor_configuration_request_method
		request_post_body = var.monitor_configuration_request_post_body
		request_query_params {

			#Optional
			param_name = var.monitor_configuration_request_query_params_param_name
			param_value = var.monitor_configuration_request_query_params_param_value
		}
		upload_file_size_in_bytes = var.monitor_configuration_upload_file_size_in_bytes
		verify_response_codes = var.monitor_configuration_verify_response_codes
		verify_response_content = var.monitor_configuration_verify_response_content
		verify_texts {

			#Optional
			text = var.monitor_configuration_verify_texts_text
		}
	}
	defined_tags = {"foo-namespace.bar-key"= "value"}
	freeform_tags = {"bar-key"= "value"}
	is_ipv6 = var.monitor_is_ipv6
	is_run_now = var.monitor_is_run_now
	is_run_once = var.monitor_is_run_once
	maintenance_window_schedule {

		#Optional
		time_ended = var.monitor_maintenance_window_schedule_time_ended
		time_started = var.monitor_maintenance_window_schedule_time_started
	}
	scheduling_policy = var.monitor_scheduling_policy
	script_id = oci_apm_synthetics_script.test_script.id
	script_parameters {
		#Required
		param_name = var.monitor_script_parameters_param_name
		param_value = var.monitor_script_parameters_param_value
	}
	status = var.monitor_status
	target = var.monitor_target
	timeout_in_seconds = var.monitor_timeout_in_seconds
}

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

Import

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

$ terraform import oci_apm_synthetics_monitor.test_monitor "monitors/{monitorId}/apmDomainId/{apmDomainId}"