oci_identity_domain

This resource provides the Domain resource in Oracle Cloud Infrastructure Identity service.

Creates a new domain in the tenancy with domain home in {@code homeRegion}. This is an asynchronous call - where, at start, {@code lifecycleState} of this domain is set to CREATING and {@code lifecycleDetails} to UPDATING. On domain creation completion this Domain’s {@code lifecycleState} will be set to ACTIVE and {@code lifecycleDetails} to null.

To track progress, HTTP GET on /iamWorkRequests/{iamWorkRequestsId} endpoint will provide the async operation’s status.

After creating a Domain, make sure its lifecycleState changes from CREATING to ACTIVE before using it. If the domain’s {@code displayName} already exists, returns 400 BAD REQUEST. If any one of admin related fields are provided and one of the following 3 fields - {@code adminEmail}, {@code adminLastName} and {@code adminUserName} - is not provided, returns 400 BAD REQUEST. - If {@code isNotificationBypassed} is NOT provided when admin information is provided, returns 400 BAD REQUEST. - If any internal error occurs, return 500 INTERNAL SERVER ERROR.

Example Usage

resource "oci_identity_domain" "test_domain" {
	#Required
	compartment_id = var.compartment_id
	description = var.domain_description
	display_name = var.domain_display_name
	home_region = var.domain_home_region
	license_type = var.domain_license_type

	#Optional
	admin_email = var.domain_admin_email
	admin_first_name = var.domain_admin_first_name
	admin_last_name = var.domain_admin_last_name
	admin_user_name = oci_identity_user.test_user.name
	defined_tags = {"Operations.CostCenter"= "42"}
	freeform_tags = {"Department"= "Finance"}
	is_hidden_on_login = var.domain_is_hidden_on_login
	is_notification_bypassed = var.domain_is_notification_bypassed
	is_primary_email_required = var.domain_is_primary_email_required
}

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

Import

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

$ terraform import oci_identity_domain.test_domain "id"