oci_dns_steering_policy

This resource provides the Steering Policy resource in Oracle Cloud Infrastructure DNS service.

Creates a new steering policy in the specified compartment. For more information on creating policies with templates, see Traffic Management API Guide.

Example Usage

resource "oci_dns_steering_policy" "test_steering_policy" {
	#Required
	compartment_id = var.compartment_id
	display_name = var.steering_policy_display_name
	template = var.steering_policy_template

	#Optional
	answers {
		#Required
		name = var.steering_policy_answers_name
		rdata = var.steering_policy_answers_rdata
		rtype = var.steering_policy_answers_rtype

		#Optional
		is_disabled = var.steering_policy_answers_is_disabled
		pool = var.steering_policy_answers_pool
	}
	defined_tags = var.steering_policy_defined_tags
	freeform_tags = var.steering_policy_freeform_tags
	health_check_monitor_id = oci_health_checks_http_monitor.test_http_monitor.id
	rules {
		#Required
		rule_type = var.steering_policy_rules_rule_type

		#Optional
		cases {

			#Optional
			answer_data {

				#Optional
				answer_condition = var.steering_policy_rules_cases_answer_data_answer_condition
				should_keep = var.steering_policy_rules_cases_answer_data_should_keep
				value = var.steering_policy_rules_cases_answer_data_value
			}
			case_condition = var.steering_policy_rules_cases_case_condition
			count = var.steering_policy_rules_cases_count
		}
		default_answer_data {

			#Optional
			answer_condition = var.steering_policy_rules_default_answer_data_answer_condition
			should_keep = var.steering_policy_rules_default_answer_data_should_keep
			value = var.steering_policy_rules_default_answer_data_value
		}
		default_count = var.steering_policy_rules_default_count
		description = var.steering_policy_rules_description
	}
	ttl = var.steering_policy_ttl
}

Argument Reference

If a change to the Steering Policy will result in the destruction and recreation of the resource, the Steering Policy will be temporarily removed from all attached domains while it is being updated. Since this could cause a temporary outage we recommend that you create DNS records at the affected domains with default values. Those records will be used to resolve DNS queries for the affected domains while the Steering Policy is offline.

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

Import

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

$ terraform import oci_dns_steering_policy.test_steering_policy "id"