oci_dns_zone

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

Creates a new zone in the specified compartment. For global zones, if the Content-Type header for the request is text/dns, the compartmentId query parameter is required. text/dns for the Content-Type header is not supported for private zones. Query parameter scope with a value of PRIVATE is required when creating a private zone. Private zones must have a zone type of PRIMARY. Creating a private zone at or under oraclevcn.com within the default protected view of a VCN-dedicated resolver is not permitted.

Example Usage

resource "oci_dns_zone" "test_zone" {
	#Required
	compartment_id = var.compartment_id
	name = var.zone_name
	zone_type = var.zone_zone_type

	#Optional
	defined_tags = var.zone_defined_tags
	external_downstreams {
		#Required
		address = var.zone_external_downstreams_address

		#Optional
		port = var.zone_external_downstreams_port
		tsig_key_id = oci_dns_tsig_key.test_tsig_key.id
	}
	external_masters {
		#Required
		address = var.zone_external_masters_address

		#Optional
		port = var.zone_external_masters_port
		tsig_key_id = oci_dns_tsig_key.test_tsig_key.id
	}
	freeform_tags = var.zone_freeform_tags
	scope = var.zone_scope
	view_id = oci_dns_view.test_view.id
}

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

Import

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

$ terraform import oci_dns_zone.test_zone "id"