oci_dns_resolver

This resource provides the Resolver resource in Oracle Cloud Infrastructure DNS service.

Updates the specified resolver with your new information.

Note: Resolvers are associated with VCNs and created when a VCN is created. Wait until created VCN’s state shows as Available in OCI console before updating DNS resolver properties. Also a VCN cannot be deleted while its resolver has resolver endpoints. Additionally a resolver endpoint cannot be deleted if it is referenced in the resolver’s rules. To remove the rules from a resolver user needs to update the resolver resource. Since DNS Resolver gets deleted when VCN is deleted there is no support for Delete for DNS Resolver.

Example Usage

resource "oci_dns_resolver" "test_resolver" {
	#Required
	resolver_id = oci_dns_resolver.test_resolver.id

	#Optional
	scope = "PRIVATE"
	attached_views {
		#Required
		view_id = oci_dns_view.test_view.id
	}
	defined_tags = var.resolver_defined_tags
	display_name = var.resolver_display_name
	freeform_tags = var.resolver_freeform_tags
	rules {
		#Required
		action = var.resolver_rules_action
		destination_addresses = var.resolver_rules_destination_addresses
		source_endpoint_name = oci_data_connectivity_endpoint.test_endpoint.name

		#Optional
		client_address_conditions = var.resolver_rules_client_address_conditions
		qname_cover_conditions = var.resolver_rules_qname_cover_conditions
	}
}

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

Import

Resolvers can be imported using their OCID, e.g.

$ terraform import oci_dns_resolver.test_resolver "id"